Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
  1. #1
    Junior Member
    Join Date
    Feb 2009
    Posts
    18
    Member #
    18405
    Ok so I have another problem.

    I am executing some javascript that uses the HTML DOM to alter my page. I am adding some objects.

    var tabl1 = document.createElement('table');
    tabl1.border = 'border';
    display.appendChild(tabl1);
    var tr1 = document.createElement('tr');
    tabl1.appendChild(tr1);
    var tr1d1 = document.createElement('td');
    tr1.appendChild(tr1d1);
    var link = document.createElement('a');
    link.href = 'popup.php?C1=blah';
    link.innerHTML = 'Last Name';
    tr1d1.appendChild(link);


    What I want to do is to create some text within my table that when clicked will pass some variables into a php script and open up a small popup window explaining the text.

    If it was just a matter of html this would be easy, but I have to use the HTML DOM. Any suggestions on how I can do this?

  2.  

  3. #2
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    You should look into AJAX. Actually, first you should look into jQuery or Prototype or some similar Javascript library that will abstract a lot of this stuff away for you. You will find a lot of these things are quick function calls in those frameworks.

  4. #3
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    Some additional info - AJAX is the JavaScript XmlHttpRequest protocol implementation. It's used to communicate back and forth with a server-side application without reloading a web page.

    jQuery has superb AJAX handling.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 05:06 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com