Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Szitar

Members
  • Joined

  • Last visited

  1.    Szitar reacted to a post in a topic: global and local variables with functions
  2. Example 3 also works if i put the Javascript at the bottom of the page. Thank You for your help!
  3. Hello, The following codes are for use with xml data. Example 1 and 2 are working but example 3 does not, even if $x and $cards chould be global variables. I use $ sign before every variable as i found it easier to get around. Please explain why example 3 does not work comment any issues you find. code starts with: if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari $xmlhttp = new XMLHttpRequest(); }else{ // code for IE6, IE5 $xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } $xmlhttp.open("GET","bscard.xml",false); $xmlhttp.send(); $xmlDoc = $xmlhttp.responseXML; example 1: function display() { $x = document.getElementById("test"); $cards = $xmlDoc.getElementsByTagName("BusinessCard"); $cards = getElement(); $name = $cards[0].getElementsByTagName("name")[0].firstChild.data; $phone1str = $cards[0].getElementsByTagName("phone")[0].getAttribute("type") + ": "; $phone1 = $cards[0].getElementsByTagName("phone")[0].firstChild.data; $phone2str = $cards[0].getElementsByTagName("phone")[1].getAttribute("type") + ": "; $phone2 = $cards[0].getElementsByTagName("phone")[1].firstChild.data; $phone3str = $cards[0].getElementsByTagName("phone")[2].getAttribute("type") + ": "; $phone3 = $cards[0].getElementsByTagName("phone")[2].firstChild.data; $email = $cards[0].getElementsByTagName("email")[0].firstChild.data; $x.innerHTML = $name + "<br />" + $phone1str + $phone1 + "<br />" + $phone2str + $phone2 + "<br />" + $phone3str + $phone3 + "<br />" + $email; } examlpe 2: function getElement(){ $x = document.getElementById("test"); $cards = $xmlDoc.getElementsByTagName("BusinessCard"); return $cards; } function display() { $cards = getElement(); $name = $cards[0].getElementsByTagName("name")[0].firstChild.data; $phone1str = $cards[0].getElementsByTagName("phone")[0].getAttribute("type") + ": "; $phone1 = $cards[0].getElementsByTagName("phone")[0].firstChild.data; $phone2str = $cards[0].getElementsByTagName("phone")[1].getAttribute("type") + ": "; $phone2 = $cards[0].getElementsByTagName("phone")[1].firstChild.data; $phone3str = $cards[0].getElementsByTagName("phone")[2].getAttribute("type") + ": "; $phone3 = $cards[0].getElementsByTagName("phone")[2].firstChild.data; $email = $cards[0].getElementsByTagName("email")[0].firstChild.data; $x.innerHTML = $name + "<br />" + $phone1str + $phone1 + "<br />" + $phone2str + $phone2 + "<br />" + $phone3str + $phone3 + "<br />" + $email; } example 3: $x = document.getElementById("test"); $cards = $xmlDoc.getElementsByTagName("BusinessCard"); function display() { $name = $cards[0].getElementsByTagName("name")[0].firstChild.data; $phone1str = $cards[0].getElementsByTagName("phone")[0].getAttribute("type") + ": "; $phone1 = $cards[0].getElementsByTagName("phone")[0].firstChild.data; $phone2str = $cards[0].getElementsByTagName("phone")[1].getAttribute("type") + ": "; $phone2 = $cards[0].getElementsByTagName("phone")[1].firstChild.data; $phone3str = $cards[0].getElementsByTagName("phone")[2].getAttribute("type") + ": "; $phone3 = $cards[0].getElementsByTagName("phone")[2].firstChild.data; $email = $cards[0].getElementsByTagName("email")[0].firstChild.data; $x.innerHTML = $name + "<br />" + $phone1str + $phone1 + "<br />" + $phone2str + $phone2 + "<br />" + $phone3str + $phone3 + "<br />" + $email; }
  4. Hello, Try to put the $_POST['whatever'] in a variable and if it does not work check some string functions on php.net. Please note that using global variables is a big security issue. Regards
  5. Hello, I need a JavaScript function modification. This function replaces the content in messages div. I need two variables added to the function so i can call it like replaceContent(var1, var2, var3). var 1 and 2 are numbers, var3 is the name of the div. I would like to use this function in a form with onselect option. Please check function and form example below. Function: function replaceContent(){ //Send an XMLHttpRequest to the 'newcontent.php' file if(window.XMLHttpRequest){ xmlhttp = new XMLHttpRequest(); xmlhttp.open("GET","newcontent.php",false); xmlhttp.send(null); } else{ xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); xmlhttp.open("GET","newcontent.php.php",false); xmlhttp.send(); } //Replace the content of the messages with the response from the 'newcontent.php.php' file document.getElementById('messages').innerHTML = xmlhttp.responseText; } Form: <form> <select name="select1" id="select1"> <option value="1" onselect"replaceContent(var1, var2, var3)"> one </option> <option value="2" onselect"replaceContent(var1, var2, var3)"> two </option> </select> <select name="select2" id="select2"> <option value="1" onselect"replaceContent(var1, var2, var3)"> one </option> <option value="2" onselect"replaceContent(var1, var2, var3)"> two </option> </select> <select name="select3" id="select3"> <option value="1" onselect"replaceContent(var1, var2, var3)"> one </option> <option value="2" onselect"replaceContent(var1, var2, var3)"> two </option> </select> </form> Thank you for your help!
  6. In this case you pay all your profit to yourself by PAYE. Do you have to pay anything other than income tax and NI? Is there any rate to pay if the company employes 2 person? I sow somewhere, there is a 12% rate to pay on egross wages after every employee. Is thistrue?
  7. Szitar replied to Sjackson's topic in Server Side
    In this case if a spammer enter a valid but not existed email you still get junk mails. Try loog after a freeware email validation script. Check how it works then write your own.
  8.    Szitar reacted to a post in a topic: Need help with Mysql query
  9. Thank You! It`s working now!
  10.    Szitar reacted to a post in a topic: Need help with Mysql query
  11. Thanks for the help. Yes there is a SEO link but the site is my and it is not a part of a paid link building.
  12. Hi all! I have an internet radio website. I need help with a mysql query. I want my result contain only the id`s "WHERE `visible`=1" but i can not work it out. Current query generated by my script: $query = "SELECT * FROM radios WHERE id=10 OR id=32 OR id=42 OR ..."; Please help!
  13. I installed the forum on my localhost. When i want to refrech it says there is no need to refrach because the files are stored in the file system or something like that. I deleted then installed the style but nothing happened! When i opened and saved the template in phpbbs built in editor (no changes made at all) it worked. Thanks!
  14. I modifed phpbb3 subsilver 2 theme. I want to remove the header but my changes in overall_header.html doesnt have any effect. Any ideas?
  15. Hi! You should look around at the webshops for better prices and hardware. There are many high end stuff. 1920 x 1280 res is normal in the price range above £200. I recommend desktop pc. It is cheaper to upgrade and for a £1000 you get 2 times better stuff then when you buy a laptop. Visit http://www.ebuyer.com , http://www.overclockers.co.uk , http://www.saverstore.com/. Regards
  16. Hi! It is done in flash with XML database. Maybe i can help. Sorry i am busy now i will post again later.
  17. How is your project going on?

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.