BretG
Posts: 5
|
| Posted: 05/24/2005, 8:14 AM |
|
I am trying to create a hyperlink on a form that changes based on the value that the user enters into a text box on the same form. Once they save the form and refresh - I can create the link as the form is rendered - but I want to be able to change the link after they leave the textbox.
I have tried adding a Client Side Event - On Change but it doesn't seem to be getting called. And I have know idea of how the javascript should be written
I have tried the following as a test - with no luck
document.getElementById("helpdesklink").href = "http://www.google.com";
document.getElementById("helpdesklink").innerHTML = "http://www.google.com";
Any ideas ?
|
 |
 |
mrachow
Posts: 509
|
| Posted: 05/24/2005, 8:27 AM |
|
You should be able to access the content of the text field in (server) event OnValidate.
_________________
Best regards,
Michael |
 |
 |
BretG
Posts: 5
|
| Posted: 05/24/2005, 8:32 AM |
|
Yes, I understand that I can do all kinds of things on the server side - but I don't want to do a return trip. I want to be able to do this on the client side. That is what the client side onchange events should do.
|
 |
 |
peterr
Posts: 5971
|
| Posted: 05/24/2005, 9:58 AM |
|
Bret, see: http://www.google.com/search?hl=en&q=javascript+change+hyperlink+value http://www.codingforums.com/archive/index.php/t-25333.html
You probably don't need to use CCS link control and CCS events in this case, just create your link and JavaScript directly in HTML, as others who don't use CCS.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
BretG
Posts: 5
|
| Posted: 05/24/2005, 11:09 AM |
|
Thanks! I had been looking there as well - just needed the reassurance that I wasn't missing a function in CSS.
Ended up adding a button with an Onclick Client-side event that had the following window.open('http://ifshelpdesk/TicketsRecord.asp?TicketID=' + document.frmCase.HelpdeskId.value,'IFSTicket')
And also had to realize that the javascript was not working in the CCS browser - I had to actually view in an external browser to fire the event.
Bret
|
 |
 |