Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamically managing links.

Status
Not open for further replies.

Draug

Programmer
Joined
Apr 18, 2001
Messages
77
Location
CA
Hi,

I have a page that displays links. These links need to change thier search values dynamically as the user selects different items on the screen. Creating the link dynamically is easy enough, but it is updating the link that is causing me grief.

Below is a snippet of the code:
//create the link
var link = &quot;<A href = ' Link </a>&quot;;
var searchParameters = &quot;?activity=&quot; +actChoice;
//add the dynamically generated search parameters
links[0].search = searchParameters;

The above produces the link on the page with the value of:

Now if I use the links[0].search property to retrieve the parameters, I get ?activity=activity just as I should. But, when I set links[0].search to another value, this value is not updated into the links[0].search index. Not only does the link itself not get updated, if I look into the links[0].search location, the data in there is not even updated.

Can anyone tell me how to set the search property of the link so that it actually changes? Do I need to open and close the document or something like that?

Any info would be appreciatted.

Thanks,
Draug
 
Sorry, I figured it out. Figures that I would, only a few minutes after I posted it. I had worked on it for hours before the post...just the way it goes I guess.

:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top