aspose file tools
The moose likes HTML, CSS and JavaScript and the fly likes Dynamically assign ID to hyperlink Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "Dynamically assign ID to hyperlink" Watch "Dynamically assign ID to hyperlink" New topic
Author

Dynamically assign ID to hyperlink

Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1254
I run jQuery and return a set of values. I want to use one of these values as the ID of a hyperlink created after the jQuery call runs.

my returned value is wResults.iNumber

my hyperlink
'<A href="#" id=wResults.iNumber onclick="accessEditForm(this.id)">Edit</A>'

How can I get the hyperlink to read the value of the wResults.recseq variable?
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15357
    
    6
Set the attribute?



I am not sure what youa re doing, maybe some more code would shed more light on your question.

Eric
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56192
    
  13

I have no idea what you are asking. What's wResults.recseq and what does it mean to "read" it?

And, you are using jQuery, yet have onclick attributes in your HTML?


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Dynamically assign ID to hyperlink
 
Similar Threads
Question on how to fix error on inputHidden field
How to change the value of Hyperlink
Reset range slider values
Session variables are getting hosed!
passing value by hyperlink