Disclaimer Messages


I'm new to Javascript and could use a bit of advice. I''m looking for a simple way to call a Disclaimer message on a link outside our site.. ... I have tried using the confirm mesage but it still goes to the outside link when someone selects cancel. Can anyone share with me a simple script to do such a thing. link to another site .....shows disclaimer with option to continue to link or cancel and return to previous page.
Posted On: Tuesday 27th of November 2012 12:12:27 AM Total Views:  55
View Complete with Replies

RELATED TOPICS OF JavaScript PROGRAMMING LANGUAGE




Show array of messages to user

Folks, i have the following scenario. Hope you can help me with. On HTML page i have several checkboxes. Then by clicking in a button i call for a javascript function that scan all checkboxes and build a array with the checkboxes values. Now i want to display to the user the content of this array. It can be as ALERT (with multiple lines) or send the content of the array to another blank page. Can someone help me with an example on how to achieve this
VIEWS ON THIS POST

80

Posted on:

Tuesday 25th September 2012
View Replies!

Alert messages; Help?

, I am trying to make alert messages for when neither a flight nor seating preference has been made, and it is a struggle. Any help would be amazing. Also, if there is anything that can be done to improve my code, please mention. gotham airlines function calculateCost() { for (var i = 1; i < 7; i++) { var radiobutton = document.getElementById("flight" + i); if (radiobutton.checked == true) { var base=radiobutton.value; } } var rtn=document.getElementById("returnfare").checked2:1; for (var a = 1; a < 4; a++) { var radiobutton = document.getElementById("seating" + a); if (radiobutton.checked == true) { var seatclass=radiobutton.value; } } var cost=base*rtn*seatclass; alert("The selected flight will cost $" + cost); } Gotham Airlines Fare Calculator Complete the form below to calculate the cost of your flight. Route: Gotham - Hill Valley Gotham - Las Venturas Gotham - Storybrooke Gotham - Marlinshire Gotham - Lillian Gotham - Seahaven Click here if you will be purchasing a return fare Seating: First class Business class Economy class , At the beginning of the function, add: Code: var base=0, seatclass=0; In place of your alert: Code: if (base == 0) { alert("no route"); } else { if (seatclass == 0) { alert("no seet"); } else { alert("The selected flight will cost $" + cost); } }
VIEWS ON THIS POST

47

Posted on:

Thursday 27th September 2012
View Replies!

Alert messages; Help?

, I am trying to make alert messages for when neither a flight nor seating preference has been made, and it is a struggle. Any help would be amazing. Also, if there is anything that can be done to improve my code, please mention. gotham airlines function calculateCost() { for (var i = 1; i < 7; i++) { var radiobutton = document.getElementById("flight" + i); if (radiobutton.checked == true) { var base=radiobutton.value; } } var rtn=document.getElementById("returnfare").checked2:1; for (var a = 1; a < 4; a++) { var radiobutton = document.getElementById("seating" + a); if (radiobutton.checked == true) { var seatclass=radiobutton.value; } } var cost=base*rtn*seatclass; alert("The selected flight will cost $" + cost); } Gotham Airlines Fare Calculator Complete the form below to calculate the cost of your flight. Route: Gotham - Hill Valley Gotham - Las Venturas Gotham - Storybrooke Gotham - Marlinshire Gotham - Lillian Gotham - Seahaven Click here if you will be purchasing a return fare Seating: First class Business class Economy class , At the beginning of the function, add: Code: var base=0, seatclass=0; In place of your alert: Code: if (base == 0) { alert("no route"); } else { if (seatclass == 0) { alert("no seet"); } else { alert("The selected flight will cost $" + cost); } }
VIEWS ON THIS POST

49

Posted on:

Saturday 29th September 2012
View Replies!

Show array of messages to user

Folks, i have the following scenario. Hope you can help me with. On HTML page i have several checkboxes. Then by clicking in a button i call for a javascript function that scan all checkboxes and build a array with the checkboxes values. Now i want to display to the user the content of this array. It can be as ALERT (with multiple lines) or send the content of the array to another blank page. Can someone help me with an example on how to achieve this
VIEWS ON THIS POST

81

Posted on:

Tuesday 16th October 2012
View Replies!

No formatting for form error/success messages.

Hi . I'm having a hard time figuring out how to word my question, so hopefully I can explain this ok. I purchased an html theme and the author is not available for support. My main problem is with the contact form. It works well, but the validation messages do not format properly. If someone filled out the form and there were errors, the resulting error messages have zero formatting. It basically creates a new page that looks like this: The theme demo has a nicely formatted message that pops up on the same page as the contact form. I'll include as much code as I can to help. html: Code: * Your Name * Email * Phone *Type of piano: 48" Upright Piano 50" Upright Piano 52" Upright Piano 54" Upright Piano 56" Upright Piano 5' Grand Piano 6' Grand Piano 7' Grand Piano 8' Grand Piano 9' Grand Piano *Address for Pickup *Number of steps *Address for Delivery *Number of steps Deed moving date: am or pm pickup a.m. p.m. either a.m. or p.m. is fine Additional Comments Enter the Verification Number     The php: Code: The javascript: Code: jQuery(document).ready(function(){ $('#contactform').submit(function(){ var action = $(this).attr('action'); $('#contactform #submit').attr('disabled','disabled').after(''); $("#message").slideUp(750,function() { $('#message').hide(); $.post(action, { name: $('#name').val(), email: $('#email').val(), phone: $('#phone').val(), type: $('#type').val(), startingaddress: $(#'startingaddress').val(), startingsteps: $(#'startingsteps').val(), endingsteps: $(#'endingsteps').val(), date: $(#'date').val(), ampm: $(#'ampm').val(), comments: $('#comments').val(), verify: $('#verify').val() }, function(data){ document.getElementById('message').innerHTML = data; $('#message').slideDown('slow'); $('#contactform img.loader').fadeOut('fast',function(){$(this).remove()}); $('#contactform #submit').attr('disabled',''); if(data.match('success') != null) $('#contactform').slideUp('slow'); } ); }); return false; }); }); And the relevant css: Code: /*------------------------------------------------*/ /* Contact Form /*------------------------------------------------*/ #contact-page { display: block;margin-bottom:50px;} #contact-page p {text-align:justify;} #contact-page h3 {font-size:26px;margin:20px 0;} #contact-page label { display: inline-block; float: left; height: 26px; line-height: 26px; width: 120px;} #contact-page label img {border:0 none;} #contact-page input, #contact-page textarea, #contact-page select { margin: 0; padding: 10px; color: #666; background: #f5f5f5; border: 1px solid #ccc; margin: 5px 0; -moz-border-radius: 5px; -webkit-border-radius:5px; } #contact-page input:focus, #contact-page textarea:focus, #contact-page select:focus { border: 1px solid #999; background-color: #fff; color:#333; } #contact-page input.submit {width: 85px; cursor: pointer; border: 1px solid #222; background:#333; color:#fff; float:right;position: relative;right: 50px;top: 10px;} #contact-page input.submit:hover { background:#444; } #contact-page fieldset {} #contact-page legend { padding:20px 0; font-weight:bold; color:#000;} #contact-page span.required{ font-size: 13px; color: #ff0000; float:left; } /* Select the colour of the * if the field is required. */ #contact-page label.addition {font-size:16px;color:#666;width:70px;} #contact-page input#verify {margin:0 0!important;padding:5px;} /* Style for the error message */ #message { margin: 10px 0; padding: 0; } .error_message { display: block; line-height: 22px; background: #FBE3E4 url(../includes/assets/error.gif) no-repeat 10px 6px; padding: 3px 10px 3px 35px; color:#8a1f11;border: 1px solid #FBC2C4; -moz-border-radius:5px; -webkit-border-radius:5px; } ul.error_messages { margin: 0 0 0 15px; padding: 0; } ul.error_messages li { height: 22px; line-height: 22px; color:#333; } .loader { padding: 0 10px; } #contact #success_page h1 { background: url(../includes/assets/success.gif) left no-repeat; padding-left:22px; } acronym {} /* Contact Sidebar Details */ #contact-sidebar h3 {font-size:22px;padding:25px 0 0 0;margin-bottom:20px;color:#000;} #contact-sidebar h5 {padding:10px 0 0 0;color:#000;} #success_page h3 {padding:10px 10px;background:#E8E8E8;color:#4D778F;} #success_page p {margin:20px 0 0;} You can see the site here: http://bit.ly/PMVCks
VIEWS ON THIS POST

67

Posted on:

Wednesday 17th October 2012
View Replies!

Computing Buttons to work and alert messages

Gee, I wonder what school you are attending Couldn't possibly be WWU, could it Oh, DOH on me. I see that the URL is wwu.edu. Brilliant guess, wasn't it. DOH. ********* I hate to say this, but I don't know how much clearer or simpler those instructions could be. I don't know how we can help you without simply writing the answer, since any explanation we gave would probably be more incomplete than the instructions. Ahhh...I just actually looked at your page. You completed it. A little more complex than it needs to be, but so far so good. What the heck... Instead of coding Code: var origin = document.forms[0].origCity.value; You can do this: Code: var origin = this.form.origCity.value; this refers to the button that this handler is an on. .form is one way to get from any field in a to the parent form. A bit faster than document.forms[0] because no "look up" is involved.
VIEWS ON THIS POST

34

Posted on:

Wednesday 17th October 2012
View Replies!

jQuery Validate outputting error messages at top of screen

Hi all, I have an issue that seems to relate to IE6 only. Tested and working in IE8 and FF3. If you go to the following page and click 'Buy Now' at the bottom of the page to submit the form the jQuery validate library error messages are displayed at the top of the page, rather than next to the corresponding form element: http://bit.ly/cc97GP
VIEWS ON THIS POST

97

Posted on:

Saturday 20th October 2012
View Replies!

Query [JavaScript]: How to pass messages betwwen 2?

I have 2 java Servlet files EmpRecord & Delete. Employee has a button of delete, on clicking it....page will be redirected to Delete.java Here the record will be deleted. Now, I want to redirect Delete.java back to EmpRecord.java where the message "Record deleted" will be displayed. How can I pass the message from Delete.java to EmpRecord.java to display the message Thank You
VIEWS ON THIS POST

100

Posted on:

Monday 19th November 2012
View Replies!

error messages

Calculating Body Mass Index /*
VIEWS ON THIS POST

144

Posted on:

Wednesday 21st November 2012
View Replies!

pop up messages

please advise on how to go about implementing pop up messages on a web based system. where by a user logs in to the system using the email address and when logged in he/she can be notified on incoming emails. how can i capture incoming emails and implement a pop up message that alerts the user.
VIEWS ON THIS POST

57

Posted on:

Sunday 25th November 2012
View Replies!