I have a form and I am using JavaScript to validate the form, so if we leave a field blank it will alert "Please Enter your Name".
If I go to the link directly, it works perfectly. But I am using an iFrame to embed it into other sites. When I embed it, and click Submit with an empty field it says:
The page at http://www.domain.com says: Please Enter your name
This is a security measure to prevent a framed site from displaying a message that appears to come from the parent site.
You cannot avoid it without avoiding the use of alert().
You could display the information to the user by modifying the DOM to display it as part of the page instead.
Related
How could I show reCAPTCHA before a page loads, like it shows the reCAPTCHA when a user visits the page and they need to fill out the reCAPTCHA then if they successfully filled out the reCAPTCHA it'd load the pages contents.
You can't do that, you will need to add an extra step in between.
You can add a page that says something like
Click here if you are a human
And then put your recaptcha validation in a button where the user responds
Sorry you don't that. When a webpage load first execute your server side language then client side language. You add ajax system.
You can hide/disable your page content untill user verify captcha process, also visit this for an idea,
How can I validate google reCAPTCHA v2 using javascript/jQuery?
I'm relatively new to the site and the programming side of things. I searched for this question but don't believe I necessarily found it (and if I did then I had difficulty deciphering the answer), so apologies if this is a repeat and/or for my potential lack of understanding.
I was wondering how I would go about creating a box within a page that would allow a visitor to the site the chance to type a url into the box and have that page appear within the box, while ensuring the user stays on the same page within my website.
For instance, a user on the page would type in a url to a tweet and that tweet would appear within a rectangular frame on the site, rather than opening or linking to a new page. Displaying within the box is important. Thank you!
You can accept the URL as user input with a form, and set the source of an iframe to show the content.
Related: How do I let a user input a video url and have the video show on the same page upon submit?
I have written a script in spreadsheet of a corresponding google form. I need to display a Message box displaying the value of "rand" as shown in the script code below in the picture.
Can anyone help me with the code for displaying the required message box. Please go through the script which is written in the script editor of the spreadsheet(corresponding to the google form).
Please go through the code and suggest any solution
Sciptcode
Unfortunately you can't interact with a google form from apps script. Your apps script is triggered on form submit and it does not give any feedback to the google form. If you want to give your user a confirmation message you should consider sending him an email from your triggered script.
The contractor that did our site used a version of smart modal jQuery plugin, not the one from Ben Marshall but this one:
https://code.google.com/p/esp1179/source/browse/trunk/smart-modal/jquery.smartmodal.js?r=22, on our login dialogs.
When an invalid login happens, the form seems to be disabled and I can't figure out why as I DO NOT explicitly disable the form or any of it's controls, with the exception of hiding the login button and showing the spinner.
https://www.scic.com/schedule
Click any of the register links that have a price showing for the course and then enter jibberish in the Username and password inputs.
The file that is calling the dialog is loadpopups.js.
Can someone check it out and help me figure out why it is happening? I'm about to pull out the only hair I have remaining.
The div element containing the error message, called "error_msg" is large and z-index'd over the entire surface of the form. Here's a screenshot from firebug:
You can fix this by adding this to your .error_msg{} style declaration (around line 2484 from the way my firefox sees the output of /css/c/style/):
height: 30px
I have a login form which gets auto-filled with username and password by the browser. On chrome I am seeing this issue where - the password field is shown as autofilled in the browser, but when I access its value through javascript, it is blank.
Has anyone hit this issue?
The values are most likely being filled out by Chrome after the page has been completely rendered. I can't tell how or when you are trying to fetch the values through your javascript but if you do it without letting the full page load you will not get any results. Try using the Window.onload-event at the bottom of the body to access the field.
Example:
<script>
//call after page loaded
window.onload=getPasswordFunc;
</script>
</body>