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 Sun Jul 29, 2007 8:04 am

ok so you have a webhost. what is the address of your site? ill be able to take a look at it then
DDragon
50+ Club
 
Posts: 93
Joined: Wed Jun 20, 2007 12:51 am
Location: Australia

Postby kame on Sun Jul 29, 2007 3:41 pm

kame
 
Posts: 13
Joined: Wed Jul 18, 2007 3:30 pm

Postby DDragon on Mon Jul 30, 2007 12:25 pm

when you edit your site do you use an FTP program like FileZilla, or do you use the tripod file manager page?
DDragon
50+ Club
 
Posts: 93
Joined: Wed Jun 20, 2007 12:51 am
Location: Australia

Postby kame on Mon Jul 30, 2007 3:28 pm

Either the tripod file manager page, or the way where you just click an edit button and it lets you type something right onto the page.
kame
 
Posts: 13
Joined: Wed Jul 18, 2007 3:30 pm

Postby DDragon on Wed Aug 01, 2007 9:23 am

I took a look at your pages code and as far as i can tell there is not form, without the form the perl script wont work place the text box in the form i made for you and then try it...

Edit: i was looking through my own archive of scripts and such and found one that you might benifit from.. its a piece of JavaScript that i wrote ages ago ill post it for you when i relocate it
DDragon
50+ Club
 
Posts: 93
Joined: Wed Jun 20, 2007 12:51 am
Location: Australia

Postby kame on Tue Aug 07, 2007 3:07 pm

My friends who are good at programming kept telling me to use javascript, but it seemed like this would work just the same
kame
 
Posts: 13
Joined: Wed Jul 18, 2007 3:30 pm

Postby DDragon on Wed Aug 08, 2007 12:48 am

well the perl does worl ive used it myself for personal pages and such... its just a bugga to set up :) the javascript is easyer as far as placement goes :) as i said ill post the script to you when i find it again :)

Edit: I have found the script just now... if you want some help in inserting the script in ill be glad to help you there :)

Here is the script:
Code: Select all
<script language="javascript">

   function executeUrl()
      {
         var addy;

         addy = document.frmUrl.txtUrlentry.value;

         alert(addy + " is the current value");

         window.location.href = "http://www." + addy;
         window.location.reload();
      }

</script>


and here is an example of the form to make:
Code: Select all
<form name="frmUrl">
   Enter the URL of the page to go to:<br>http://<input name="txtUrlentry" type="text"><br><br>

   <input type="submit" name="btnUrlEntry" onclick="executeUrl()" value="Go!">
            
</form></center>


-- DD

-= "In a world the doesn't comprehend" =-
DDragon
50+ Club
 
Posts: 93
Joined: Wed Jun 20, 2007 12:51 am
Location: Australia

Postby kame on Wed Aug 08, 2007 6:22 pm

Thanks again!

I am going to just copy and paste what I have in my box right now...

Code: Select all
<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>

<script language="javascript">

   function executeUrl()
      {
         var addy;

         addy = document.frmUrl.txtUrlentry.value;

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

</script>


When I type in "test," this is the new url:

http://radiumpuzzle.tripod.com/1.html?t ... =Try+It%21
Am I not supposed to copy directly what your code was, or are there things that I need to change?
kame
 
Posts: 13
Joined: Wed Jul 18, 2007 3:30 pm

Postby DDragon on Thu Aug 09, 2007 2:25 am

ok i found it... you need to change this line
Code: Select all
window.location.href = "http://radiumpuzzle.tripod.com/" + addy".html";
to look like this:
Code: Select all
window.location.href = "http://radiumpuzzle.tripod.com/" + addy + ".html";


that should fix it
DDragon
50+ Club
 
Posts: 93
Joined: Wed Jun 20, 2007 12:51 am
Location: Australia

Postby kame on Sun Aug 12, 2007 9:24 pm

http://radiumpuzzle.tripod.com/1.html?t ... =Try+It%21

I am still getting that address. Do I need to put the javascript somewhere else?
kame
 
Posts: 13
Joined: Wed Jul 18, 2007 3:30 pm

PreviousNext

Who is online

Users browsing this forum: No registered users and 7 guests