Click to See Complete Forum and Search --> : Simple page call


jdanw
12-02-2005, 07:17 AM
I have searched for nearly a day and have not found an answer to this. is it possible to call a new page in the form of MywebSITE.com/XXXX where XXXX is what the visitor enteres in a simple text box. I am creating a page for each entry in the form of the web address above (each entry has it's own page denoted by the XXXX). I am pretty new to anything other than plain HTML, so I am trying to avoid learning php or asp or anything deeper at this point. I will eventually insert a database to search by features that might be contained on the XXXX pages, but for now, the breadth of the content doesn't warrent too much...TIA

JDanW

TheBearMay
12-02-2005, 07:26 AM
Is something like this what you're looking for?

<input type="text" id="wPage" />
<button onclick="window.open('http://MywebSITE.com/'+document.getElementById('wPage').value)">Go Page</button>

jdanw
12-02-2005, 08:03 AM
AWK! Thanks for the quick reply. I see the elements, but this is what I was using. I just couldn't get the post right. I am using an image button, a table for placement and the button is ahead/above the text box.

<FORM style="margin-bottom:0" METHOD="post" ACTION=$address+.html>
<table border="0" width="100%" cellspacing="0" cellpadding="0" id="table1">
<tr>
<td><INPUT TYPE="image" SRC="images/srchbtn.gif" HEIGHT="32" WIDTH="112" BORDER=0 ALT="picture button"></td></td>
</tr>
<tr>
<td align="center"><INPUT TYPE="text" NAME="address" SIZE="10" align="center"></td>
</tr>
</table>
</form>

jdanw
12-02-2005, 09:52 AM
:rolleyes: I took another look an got it to work within my page. Here's what I came up with and it works :) . If anyone is checking this out, please take a look and let me know if anything is unconventional that might cause a problem when being viewed. I am checking w/IE and Firefox.

Also, what is this code? Java? HTML4.0? etc.? With this information, I might be able to anser the next question.

:confused: How can I get the page to open in the same window (I would assume change window.open to something)?

<FORM style="margin-bottom:0" METHOD="post" ACTION=$address+.html>
<table border="0" width="100%" cellspacing="0" cellpadding="0" id="table1">
<tr>
<td><input type="image" src="images/srchbtn.gif" HEIGHT="32" WIDTH="112" BORDER=0 onclick="window.open(document.getElementById('wPage').value+'.html')"></td>
</tr>
<tr>
<td align="center"><INPUT TYPE="text" id="wPage" SIZE="10" align="center"></td>
</tr>
</table>
</form>

TIA ;)
=================
OK, looks like I might have a problem. I replaced the window.open with page.open just to try and now I am back to getting the ACTION...result. What do i do to structure this correctly? Do I change the FORM tag specifics to use the onclick?

TIA again ;)

TheBearMay
12-02-2005, 10:02 AM
It's a wee bit of javascript. The second parameter of the window.open() command will allow you to open in the current window. Another option is to change the window.open to document.location.href, thus we end up with:

<input type="image" src="images/srchbtn.gif" HEIGHT="32" WIDTH="112" BORDER=0 onclick="document.location.href=document.getElementById('wPage').value+'.html'">