Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Javascript Frames - Opening From Input Box

Status
Not open for further replies.

djdon2000

Technical User
May 31, 2003
2
0
0
GB
I want to build apage with 3 frames.

Frame 1 will contain a box to enter a userID
Frame 2 & 3 will open pages dependent on the userID entered

The URL for the pages I want to appear in Frames 2 & 3 contain the userID

I want frames 2 and 3 to refresh when the userID is entered in the box on Frame 1 and the button pressed.

I am confident with HTML, however am only in the process of learning javascript and need to put this together ASAP.

Any help would be much appreciated.

Thnx, Don
 
you know that if you have a user ID in JavaScript, there is absolutely NO securtiy at all... just a warning. Anyone could easily just look at the source code and check for names and passwords.

Later,
Greelmo
 
try the following for some password protection stuff...


The best ones are those with the non-reversable password protection... But you would be much better off with an SSSL and a database than with js.

keteracel
banner-small.png
 
Doesn't need to be secure i am accesing public data, i just wanna make a page for pulling it up easily and quickly.

Thanks

Don
 
Format I've found useful for working with frames.

<script language=&quot;JavaScript&quot;>
function selectpage(id)
{ if(id==&quot;userid1&quot;)
{ LoadFrame(&quot;default_page1.htm&quot;, &quot;frame1&quot;);
}
else
{ LoadFrame(&quot;default_page2.htm&quot;, &quot;frame2&quot;);
}
}
function LoadFrame(page, frame)
{ testing.action = page;
testing.target = frame;
testing.submit();
}
</script>

<form method=&quot;post&quot; name=&quot;testing&quot;>
<frameset rows=&quot;10%,45%,45%&quot; framespacing=&quot;0&quot; frameborder=&quot;0&quot;>
<frame src=&quot;SelectItem.htm&quot; name=&quot;frame0&quot; id=&quot;frm0&quot; frameborder=&quot;0&quot; scrolling=&quot;Yes&quot; noresize marginwidth=&quot;0&quot; marginheight=&quot;0&quot;>
</frame>
<frame src=&quot;blank.htm&quot; name=&quot;frame1&quot; id=&quot;frm1&quot; frameborder=&quot;0&quot; scrolling=&quot;No&quot; noresize marginwidth=&quot;0&quot; marginheight=&quot;0&quot;>
</frame>
<frame src=&quot;blank.htm&quot; name=&quot;frame2&quot; id=&quot;frm2&quot; frameborder=&quot;0&quot; scrolling=&quot;No&quot; noresize marginwidth=&quot;0&quot; marginheight=&quot;0&quot;>
</frame>
</frameset>
</form>


--SelectItem.htm--

<script language=&quot;JavaScript&quot;>
parent.selectpage(document.userid.value);
</script>
<input type=&quot;text&quot; name=&quot;userid&quot;>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top