Hey guys,
This is my first question on this forum, so I hope you'll be able to help. I want to place a form on a Sharepoint site. I want to be able to enter a number into that form and have it take me to the following hyperlink:
ttp://server/page/Main.htm?ServerFilter="PRNumber=VARIABLE"
ie:
ttp://server/page/Main.htm?ServerFilter="PRNumber=8786"
or
ttp://server/page/Main.htm?ServerFilter="PRNumber=8121"
Hopefully pretty simple.
|
Light Poster
|
|
| 30Jun2009,02:23 | #2 |
|
all those links should say http but the form moderator wouldn't let me submit with too many live links.
|
|
~ Б0ЯИ Τ0 С0δЭ ~
|
![]() |
| 30Jun2009,08:25 | #3 |
|
Hi danielson,
Welcome to the forum ![]() I think this is what you required : HTML Code:
<head> <script language="JavaScript"> function onlyNumbers() { valid=true; var Numbers = '0123456789'; var Field1 = document.form1.number.value; if (Field1 == "") { alert ( "Please enter a number.." ); valid = false; } for (i=0; i < Field1.length; i++) { if (Numbers.indexOf(Field1.charAt(i),0) == -1) { alert ( "Numbers only !!" ); valid = false; break; } } if (valid) { document.location = "http://server/page/Main.htm?ServerFilter=\"PRNumber=" + Field1 + "\""; } } </script> </head> <body> <form name="form1"> <br><br> <center><b>Number: <input type="text" name="number"> </b></center> <br><br><br> <center> <input type="button" name="Submit" value="Submit" onclick="onlyNumbers();"> <input type="reset" name="Reset" value="Reset"></center> </body> Last edited by SaswatPadhi; 30Jun2009 at 08:28.. |
|
Banned
|
|
| 30Jun2009,08:27 | #4 |
|
Hey, tried it out with my code, good one.....
|
|
~ Б0ЯИ Τ0 С0δЭ ~
|
![]() |
| 30Jun2009,08:29 | #5 |
|
Banned
|
|
| 30Jun2009,08:31 | #6 |
|
Welcome
How to insert this smilyes ?
|
|
~ Б0ЯИ Τ0 С0δЭ ~
|
![]() |
| 30Jun2009,08:37 | #7 |
|
When you are posting replies, click "Go Advanced". You will see a lot of smileys
|
|
Banned
|
|
| 30Jun2009,08:39 | #8 |
![]() Cool, nice one, again, Thanks for this
|
|
Light Poster
|
|
| 30Jun2009,22:06 | #9 |
|
Cool, but there is one problem. It only works sometimes. For instance, I placed the HTML code on my desktop and saved the text as .htm-
Open the file in IE and click to accept blocked content. Then I entered a number. Sometimes it works and goes to the document.location url.. but sometimes it just goes to: ile:///C:/Documents%20and%20Settings/bomgardd/Desktop/pr.htm?number=32155 working: ttp://server/page/Main.htm?ServerFilter="PRNumber=98656" |
|
Light Poster
|
|
| 1Jul2009,00:18 | #10 |
|
Well, I disabled the mcafee scriptproxy addon in IE. This script then worked like a charm.
I will try to provide some input on the final fix if I decide to mess with this proxy. |




