ID:147592
 
I'm trying to set up a simple form in DMCGI that will take you to a page. Should be simple enough. It's not.

I've tried several methods of this:

The first works in a browser, and returns page.html?first&second=x Note that no method is defined.


My second try doesn't seem to return anything, in fact it doesn't reach client/Topic at all (neither does the first).


I've also tried variations of that, such as action="byond://?" and things of a similar manner, but nothing seems to be working. Meh.
HavenMaster wrote:
I'm trying to set up a simple form in DMCGI that will take you to a page. Should be simple enough. It's not.

I've tried several methods of this:

The first works in a browser, and returns page.html?first&second=x Note that no method is defined.
<form action="./?" name="search"><input type="text" name="first&second" class="smalltext" size="4"></form>

My second try doesn't seem to return anything, in fact it doesn't reach client/Topic at all (neither does the first).
<form method="GET" action="byond://" name="search"><input type="text" name="first&second" class="smalltext" size="4"></form>

Like I said, you should try taking & out of your input name; that shouldn't be there anyway and if it works in the browser it's an anomaly.

Lummox JR
In response to Lummox JR
Also like I said, it doesn't work with just ?first either. I don't think it's making a difference at all.
In response to HavenMaster
HavenMaster wrote:
Also like I said, it doesn't work with just ?first either. I don't think it's making a difference at all.

There's also the fact, brought up last night, that you have no submit button in your form.

Basically your form's not working because you're doing a lot that's completely nonstandard, and you're just trying one little change at a time to get it to work. Start off first with a form that will definitely work, and change things from there.

Lummox JR
In response to Lummox JR
Alright, with enough tweaking and the adding of a submit button, I managed to get it to work. Now my question is how can I make the submit button invisible and the default for the enter key?
In response to HavenMaster
Use a javascript
if(event.keyCode==13) form.submit();

To make invisible use style="display:none"