Click to See Complete Forum and Search --> : text box navigation?


xizor8
02-22-2004, 06:39 PM
I would like to use a text box (see name typed in ) and a go button to navigate from a home page- index. html to other folders in the web site- tommy.html, alex.html ect... I am using yahoo sitebuilder and can only use html. i tried to do it myself. can't get it to work. anyone can help me thank you

Paul Jr
02-22-2004, 06:46 PM
Right... sheesh, I dunno what's wrong with it. :(

You can see it here. (http://www.pauljunior.no-ip.com/research/namesnav.php)

fredmv
02-22-2004, 07:23 PM
How about not making your site rely on JavaScript and use something more traditional like an unordered list of links?

xizor8
02-22-2004, 08:03 PM
thank you for your reply
I'm not sure what an unordered lisk of links is.
a list of any kind does not work for me.
security is not an issue
I don't think I can use jave script?
yahoo sitebuilder program gives you a drop down box to insert html
I can do this on the index.html page and on the folder page- tommy.html, jerry.html ect...
am I out of luck?

Paul Jr
02-22-2004, 09:32 PM
I'm not sure what's wrong with this, but it's not working. :(

But to use it, you would have to be able to manually enter the Script into your page.

xizor8
02-22-2004, 10:43 PM
Hi,
I manually typed the code on sitebuilder. the text box appeared when viewed in browser. when I typed in the name- tommy it stated the page was not ment to be viewed in browser, so I published the index.html page and the tommy.html to to internet via sitebuilder and when I typed in tommy (with and without .htm) on the internet i received a message - done but error on the page. the index.html page is named keyny. thank you for getting me this far and responding again.I'm a factory worker- Queens ny, and I must go to bed now to get up in the morning
thank you for your helpl
jerry

Paul Jr
02-22-2004, 10:56 PM
The names in the script that I linked to in my first post are different from the ones you need.

Also, as I said, the script isn't working. I ran it through JS lint, FB JS Console, I stared at it for a while, and I still can't see what's wrong with it.

Lastly, can we see the code you're working with? If you didn't modify it at all, then it's not going to work, and if you did, we'll need to see it. ;)

xizor8
02-23-2004, 06:22 AM
Hi,
thank you again
the folders I want to link to (like jerry.html, TOMMY.html ect....)will be simple web pages created in yahoo sitebuilder over time.

only the name is typed in the text box- not .html?

the index.html is www,keyny.com . view- click sourse?
you can see the code if you instruct me on how I can let you see it.
thank you
jerry

Paul Jr
02-23-2004, 04:59 PM
Originally posted by xizor8
Hi,
thank you again
the folders I want to link to (like jerry.html, TOMMY.html ect....)will be simple web pages created in yahoo sitebuilder over time.

only the name is typed in the text box- not .html?

the index.html is www,keyny.com . view- click sourse?
you can see the code if you instruct me on how I can let you see it.
thank you
jerry
Yes, only the name is typed in. Although, for reasons that boggle my mind, the script isn't working. It only works properly with the first name in the array, but no others.
I've posted in the JS section - maybe I can figure this out.

xizor8
02-23-2004, 07:39 PM
again,
thank you,
jerry

Paul Jr
02-23-2004, 10:07 PM
Well I rewrote it and still no go; I haven't a clue why. But Fredmv came up with something that does work. Which is located here. (http://forums.webdeveloper.com/showthread.php?s=&threadid=28446)

xizor8
02-24-2004, 12:34 AM
thank you, thank you,
I don't have it working yet
browser on internet said 'done but with errors'
I will keep going over it until I find the typing mistake
thank you again
jerry

Paul Jr
02-24-2004, 08:08 PM
In the code below, the character highlighted in red should be changed to an apostrophe (') (Without the parentheses).

alert('That name, ' + who + ; is recognized.');

xizor8
02-24-2004, 09:53 PM
hi,
I made the change
thank you for your reply
now a microsoft internet explorer box pops up with bing
'that name is not recognized'
if i type into the browser www.keyny.com/jerry thepage comes up

could this have to do with the yahoo sitebuilder program
I could put their nav bars on my index.html page (jerry, tommy or make up two more) and it would work.

thank you
jerry

Paul Jr
02-24-2004, 09:58 PM
If you want it to go to the page, change the following line

alert('That name, ' + who + ' is recognized.');

to this line

window.location.href=who+".html";

That should do it.

xizor8
02-25-2004, 12:50 AM
hi,
it works, thank you

i have two questions
can the text box ignore case
can the not recognize look more like it's coming from keyny then the browser

mostly, i wish i didn't have to reply thank you half asleep,
i am very thankful
thank you
jerry

Paul Jr
02-25-2004, 02:28 PM
Originally posted by xizor8
i have two questions
can the text box ignore case

Yup, it sure can.
Change this following line

if(n[¡].trim().toLowerCase() == who)

To

if(n[¡].trim().toLowerCase() == who.toLowerCase())


Originally posted by xizor8
can the not recognize look more like it's coming from keyny then the browser
Not sure I follow. Do you want maybe the text displayed on your page, rather than the alert?

Originally posted by xizor8
mostly, i wish i didn't have to reply thank you half asleep,
i am very thankful
thank you
jerry
No problemo, glad I'm able to help. ;)

xizor8
02-26-2004, 05:31 PM
hi'
almost there.
on sitebuilder program- view in browser, the text box works perfect. I can type in jerrY and it takes me to the page.

on the internet from keyny.com- index.html, lower case letters work fine in the text box
of the three folders- tommy.html, alex.html, jerry.html, only th tommy page can be reached with capital letters.I published and republished the whole site with no luck.

the pop up with a bing not recognized box is fine. I get this when I type in just some name- bob, where there is no folder
the 404, which I don't like, only seems to come up when I type in alex or jerry in capital letters.
in the browser on the internet i can type tommY and I get the page.

thank you
jerry

Paul Jr
02-26-2004, 06:56 PM
Ah, I see what you mean. I haven't run into this kind of problem before, so I'm not sure if this will fix it, but try changing this line

window.location.href=who+".html";

To this

window.location.href=who.toLowerCase()+".html";

Again, not really sure if this will work or not, but it's the only thing I can think of.