Jump to content
xisto Community
Sign in to follow this  
kvarnerexpress

Js Form?

Recommended Posts

Hi,I have just become a webspace reseller and I would like to have a form on my website under the header, Manage Web Space. The form will have a textbox that ppl put their domainname in (mondomediadesigns) and then a dropdown menu with the extension (.com.au or org or net.au etc). When they click "Manage" I want it to open in a new window their admin sign-in page.So basically, I need a script that will place whatever the client puts in the form, into the script and will open it in a new window.Does anyone here know of anywhere I can download a script such as this?Thanks in advance!

Share this post


Link to post
Share on other sites

I'm pretty sure you can do this. First you would need to get each text box, then you can use the window.open command like so:

<script type="text/javascript">function open() {     window.open('http://' + getElementById('subdomain').value + '.domain.' + getElementById('extension').value + '/admin.php','','scrollbars=yes,menubar=yes,height=600,width=800,resizable=yes,toolbar=yes,titlebar=yes,location=no,status=yes');}</script>
The text box with the subdomain should have its id as "subdomain" and the box with the extension should have its as "extension". The submit button should be like this:
<input type="submit" onclick="open()" value="Go" />
If that doesn't work, try making the type "button". If the window doesn't look right, you can customize it more with this stuff: http://forums.xisto.com/no_longer_exists/

...I hope this works, it's my first real foray into the field of javascript.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.