I'm new to ASP very recently and I can't seem to get this to work
<html>
<body>
<form action="test.asp" method="post">
<input type="text" name="text" />
<input type="submit" value="submit" />
</form>
<%
dim x
x=Request.Form("text")
Responce.Write(x)
%>
</body>
</html>
The text box and submit button are displayed however this error is displayed and this ASP does not work.I'm not sure if something is wrong with my code or IIS. Any help on this would be much appreciated
An error occurred on the server when processing the URL. Please contact the system administrator.
If you are the system administrator please click here to find out more about this error.
Could be you have a typo:
Responce.Write(x)
should be:
Response.Write(x)
If you just need to print your "text" variable:
<html>
<body>
<form action="test.asp" method="post">
<input type="text" name="text" />
<input type="submit" value="submit" />
</form>
<%=Request.Form("text")%>
</body>
</html>
Related
I'm currently making automated tests for Browserstack using Selenium and Nightwatch.js. I've encountered a problem where I'm unable to submit a login form. Either nothing happens or the page just reloads. All required login data are set using browser.setValue('{selector}', '{value}'). Tried this on Chrome and Firefox, but the result is the same. I am able to submit the form using JS in browser console, though.
I've tried the following methods to no avail.
browser.submitForm('#login-form');
browser.click('#send2');
browser.execute("document.getElementById('send2').click();");
browser.execute("document.getElementById('login-form').submit();");
Is there anything that I'm missing? If that makes a difference, I'm trying to automate a login form for Magento 1 site.
Much thanks.
Edit:
Added form HTML
<form action="https://{site}/en/customer/account/loginPost/" method="post" id="login-form">
<input name="form_key" type="hidden" value="1CdZGL4mwA0njx3U">
<div class="form-group">
<input type="text" class="input-text-custom required-entry validate-email form-control" id="email" name="login[username]" value="" title="Insert Email Address" placeholder="Insert Email Address">
</div>
<div class="form-group">
<input type="password" class="input-text-custom required-entry form-control" id="pass" name="login[password]" title="Password" placeholder="Password">
</div>
<div class="form-group">
<input type="checkbox" name="nl_subscribe" id="nl_subscribe_existing" value="subscribe" class="form-control checkbox">
<label for="nl_subscribe_existing" class="text-normal-checkout"><span></span>By the way, I also want to subscribe to your newsletter*</label>
</div>
<input type="hidden" name="nl_source" value="customer_login" class="form-control checkbox">
<div class="form-group"><div class="control remember-me-box">
<div class="input-box">
<input type="checkbox" name="persistent_remember_me" class="checkbox" id="remember_meL0h6snrk30" title="Remember Me">
<label for="remember_meL0h6snrk30" class="text-normal-checkout"><span></span>Remember Me</label>
</div>
</div>
</div>
<div class="forgot-password">Forgot password?</div>
<div align="center"><button type="submit" class="button-check" name="send" id="send2" title="log in"><span><span>log in</span></span></button></div>
</form>
Edit 2:
Is it possible that this is related to configuration? I launched this test on local browser and then stopped it, so I could fill and submit the form manually, but I was not able to submit it anyway.
It appears that the script was fine but there was a bug in the site. For some reason, script needs to refresh the browser to be able to submit the form successfully. So, until this is fixed, I've implemented browser.execute('location.reload();'); as a workaround.
My company is migrating from Luminis 5.1 to Luminis 5.3 (both built from Liferay 6), and we're running into a problem where portlets that POSTed fine in 5.1 no longer supply the Post Body in 5.3.
For example, this form
<form id="duplication-request" class="form-horizontal" method="post" enctype="multipart/form-data" action="index.php">
<fieldset>
<legend>General Information</legend>
<div class="form-group">
<label for="name" class="col-sm-4 control-label">Name</label>
<div class="col-sm-8">
<input type="text" id="name" class="form-control" name="name"
value="<?= $input->request->get('name', $name) ?>" required>
</div>
</div>
</fieldset>
<button class="btn btn-primary">Submit</button>
</form>
would supply the $_POST['name'] variable just fine in Luminis 5.1, but in 5.3, not even the 'name' index is registered.
If I serve it locally via php -S 0.0.0.0:8080, the $_POST['name'] variable is registered correctly, leading me to think it's a problem with Quercus (which, unfortunately, isn't well supported)
Are there any settings in web.xml that I need to turn on in order to get Luminis to proxy the Request Body into Quercus so PHP can work with it?
I have tried iframing but it doesn't worked in Javascript disabled browser. Anyone please tell me how can I mask an url and still worked in Javascript disabled situation, thanks in advance.
Use POST, rather than GET. Something like this early in the page:
<form action="nextpage" method="post">
<input type="hidden" name="parameter1" value="value1" />
...etc...
This page
</form>
<form action="otherpage" method="post">
<input type="hidden" name="parameter1" value="value1" />
...etc...
That page
</form>
Bit more longwinded, but it will work.
Hello I am learning Bootstrap and would like to have a wysiwyg editor.
I found bootstrap-wysiwyg and want to use it.
http://mindmup.github.io/bootstrap-wysiwyg/
this example in website official use
<div id="editor">
</div>
not use
<input type="text" name="editor"> or <textarea name="editor"> </textarea>
However, I cannot figure out how to get formatted text on the server-side when a form is submitted.
Simple Solution is Submit Form by js method.
<div class="field" id="editor" data-placeholder="Insert your description."></div>
<input type="hidden" name="description" id="editor_description" value="" />
<script>
function submitform(){
$('#editor_description').val($('#editor').html());
$("#form").submit();
}
</script>
I want to make a simple searchbox in my website. I think for my situation, the best way is to use something like w3schools.com did. When user types smth and press enter it redirects to google.com/search and it will search from only w3schools.com in google because there is site:www.w3schools.com is given in url. how can i do that?
A simple solution would be something like this:
<html>
<head></head>
<body>
<form method="get" name="searchform" action="http://www.google.com/search" target="_blank">
<input type="hidden" name="sitesearch" value="stackoverflow.com">
<input type="text" name="as_q" size="20" value="Search stackoverflow.com">
<input type="submit" value="Search" title="Search">
</form>
</body>
</html>
But you should also check this out:
http://www.google.com/cse/
Just browse source code and take everything you need, that trick will often do in case of HTML how-to's:
<form method="get" name="searchform" action="http://www.google.com/search" target="_blank">
<input type="hidden" name="sitesearch" value="www.yoursite.com">
<input type="text" name="as_q" size="20" value="Search yoursite.com">
<input type="submit" value="Search" title="Search">
</form>
Well. Actually it seems this is quite easy job. I have found the solution At:
http://www.askdavetaylor.com/how_can_i_add_a_google_search_box_to_my_web_site.html/
I think what you are looking for is Google Custom Search Engine. Start here: http://www.google.com/cse/docs/ , http://www.google.com/cse/manage/all