It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming HTML Forum

Text Box that changes current URL

Postby DDragon on Tue Aug 14, 2007 2:27 pm

sorry thats my mistake, I should have told you to place the javascript in the head section of the HTML code...

It should look something like this:
Code: Select all
<html>
<head>
<title>Title of your page here</title>
<scriptlanguage="javascript">

   function executeUrl()
      {
         var addy;

         addy = document.frmUrl.txtUrlentry.value;

         window.location.href = "http://radiumpuzzle.tripod.com/" + addy".html";
         window.location.reload();
      }

</script>
</head>


place the javascript so its inbetween the head tags like that and it should fix your problem...
DDragon
50+ Club
 
Posts: 93
Joined: Wed Jun 20, 2007 12:51 am
Location: Australia

Postby kame on Mon Aug 20, 2007 7:18 pm

.... That all makes sense, I do it all exactly, but it still isn't working!!!! I don't get it. I have that javascript in the very top of my page, under html, head, and title. I have txtUrlentry exactly the same in both. Could it be the spaces in "addy = document....? I'll just have to work around not having a text box. Thank you for helping.
kame
 
Posts: 13
Joined: Wed Jul 18, 2007 3:30 pm

Postby DDragon on Tue Aug 21, 2007 11:37 am

ok post the entirety of your HTML code in here that you have written (without the tripod additions) and ill see if there is anything wrong from it...
DDragon
50+ Club
 
Posts: 93
Joined: Wed Jun 20, 2007 12:51 am
Location: Australia

Postby kame on Wed Aug 22, 2007 12:08 am

Code: Select all
<html>
   <HEAD>
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
   
      <META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
      <META http-equiv="Expires" content="0">
      <META name="TRELLIX_BUILDER_VER" content="1.0"><META name="TRELLIX_OPEN_SITE_COMMAND" content="http://build.tripod.lycos.com:80/trellix/sitebuilder/SiteBuilderServlet?fUrl=/trellix/sitebuilder/f_error.html&sUrl=/trellix/sitebuilder/f_edit_page.html&Command=OpenSite&FileName=306926595275820420/site.xml"></META>
      <!--base href="http://radiumpuzzle.tripod.com//"-->
      <!--/base--><script language="Javascript"><!--
      document.isTrellix = 1;
//                  --></script><title>1</title>
<scriptlanguage="javascript">

   function executeUrl()
      {
         var addy;

         addy = document.frmUrl.txtUrlentry.value;

         window.location.href = "http://radiumpuzzle.tripod.com/" + addy".html";
         window.location.reload();
      }

</script>

I'm not sure whether that is too much or too little. Later on in the script...
Code: Select all
                                 <p align="left"><font face="Verdana,Arial,Helvetica,sans-serif" size="2" color="ffffff"><form name="frmUrl">
                                       Your Guess:<br><input name="txtUrlentry" type="text"><br><br>
                                   
                                       <input type="submit" name="btnUrlEntry" onclick="executeUrl()" value="Try It!">
                                               
                                    </form></center>
                                   
                                   
                                    <!--"''"--></font>
                                 </p>
kame
 
Posts: 13
Joined: Wed Jul 18, 2007 3:30 pm

Postby matt_raleigh on Fri Sep 21, 2007 1:49 pm

here's the code to do what you were asking, keeping it very simple (the >> means line wrap)

<form>
<input type="text" name="goto" Value = "http://www.">
<input type="button" VALUE="GO!">>
OnClick=location.href=goto.value;>
</form>
User avatar
matt_raleigh
 
Posts: 15
Joined: Thu Sep 20, 2007 6:45 pm

Postby kame on Wed Oct 03, 2007 12:35 am

http://cnfsn.tripod.com/crystal/index.htm
That is the type of text box that I'm trying to make.
kame
 
Posts: 13
Joined: Wed Jul 18, 2007 3:30 pm

Previous

Who is online

Users browsing this forum: No registered users and 9 guests