Jump to content

Modifying href


ameliabob

Recommended Posts

I am trying to have an 'href' that can be modified before it is executedin my code I have a line:<a href="process.php?function=UpdateDataBase" >Update Database</a>This works just fine.I would like to have a text box in the window that I could type a date and then have the href look like<a href="process.php?function=UpdateDataBase&NewDate=03/11/2011" >Update Database</a>I tried putting some javascript code to append the red code; but the <a href wouldn't allow me to imbed the field label.Is there a clever way to do this?

Link to comment
Share on other sites

what is your javascript code?basically it should 1) get the value of the input field (value, not html)2) get the value of the href attribute of the <a> tag3) concatenate the two using appropriate delimiters, i.e. &4) take that concatenation and reassign it back to the href attribute of the <a> tag

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...