-
April 27th, 2006, 08:07 AM
#1
Dynamically create links using the data from a tables cell as a parameter
I’m trying to using javascript to create a onclick even that will find the value in the 2nd cell of the row that has been clicked on and then create a URL link using this value per row.
Example
ID FirstName SecondName
1 Mike Jones
2 Jane Downs
URL to create :
http://www.aURL.cn?Val=Mike
OR
http://www.1URL.cn?Val=Jane
I am currently wrapping the rows with a href with a onclick even in the tag : onclick="this.href = makeLinks()”but I am not getting anywhere with it yet ,
[EDIT]
Sorry to clear up makeLinks is a function but I have not started to program in it yet as I have no idea how to reference the cells and columns, I guess it is something to do with htmltableelement or a node or something I’m not 100% up to scratch with javascript yet ><
[/EDIT]
Any ideas?
Regards
cyph
Last edited by cypher_soundz; April 27th, 2006 at 08:11 AM.
-
April 27th, 2006, 10:15 AM
#2
Re: Dynamically create links using the data from a tables cell as a parameter
You need HTML DOM for this. W3Schools has all you need for this. Take a look at this. If that does not work, browse through the DOM section.
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
-
April 28th, 2006, 06:21 AM
#3
Re: Dynamically create links using the data from a tables cell as a parameter
Hi,
Thanks alot for the link i will look in to it.
Regards
cyph
-
April 28th, 2006, 08:39 AM
#4
Re: Dynamically create links using the data from a tables cell as a parameter
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|