florida
09-09-2004, 08:20 PM
I have an entry where someone enters a URL. I need to do a replace on that form entry and just fetch the html file name.
So if someone enters: http://myurlpath/myfile.html
I want to forward just myfile.html to the action page.
Here is my attempt:
<script>
function grabURLPagename()
{
document.mypagename.myurlfield.value=document.mypagename.myurlfield.replace(/?????/, '/\*.html/');
}
</script>
<form name=mypagename action=Myaction.cfm onsubmit="return grabURLPagename()";>
...
</form>
Please advise because I am not sure how to do the reg expression or if I am doing this correctly?
So if someone enters: http://myurlpath/myfile.html
I want to forward just myfile.html to the action page.
Here is my attempt:
<script>
function grabURLPagename()
{
document.mypagename.myurlfield.value=document.mypagename.myurlfield.replace(/?????/, '/\*.html/');
}
</script>
<form name=mypagename action=Myaction.cfm onsubmit="return grabURLPagename()";>
...
</form>
Please advise because I am not sure how to do the reg expression or if I am doing this correctly?