www.webdeveloper.com
Results 1 to 5 of 5

Thread: Attention to all skilled Java scripters

  1. #1
    Join Date
    Jan 2013
    Location
    UK
    Posts
    3

    Attention to all skilled Java scripters

    hi all

    okaii i need help ,i have built my own webpage that allows PHP scripting on it but i am missing a something and when i click the button it just refreshes

    here is my PHP/HTML code ,you see how it says document.getElementByid ,i don't understand this

    if(document.getElementById('u')) document.getElementById('u').focus();

    please help me understand this ,

  2. #2
    Join Date
    Jul 2011
    Posts
    127
    This piece of code check if element with id u exists in your page and then set focucs on it.

  3. #3
    Join Date
    Jan 2013
    Location
    UK
    Posts
    3
    yes but i don't know what it is ,how does it work and why is it there , does this .document have to be on my server/web host directory .also i need some help building a java script to work with my PHP program , set to play when i press my button. oz at the moment i does nothing but refresh

  4. #4
    Join Date
    Jul 2011
    Posts
    127
    document is the internal browser object. All browsers represent html page as DOM tree. You can read more about DOM here.
    Maybe you have to add preventing default action of your button or form to stop refreshing page. Please show your code to find a reason of refreshing the page.

  5. #5
    Join Date
    Jan 2013
    Location
    UK
    Posts
    3
    can you contact me via email mpeace4656465@hotmail.com so i can send you a link to my php program and then you can help point out the problem to me,

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles