Sending Message On Load

Jul 20, 2005

I have a need for a page to pop up a user/password dialogue
when it loads and for the user/password that they enter to be sent to
be logged somewhere on the server. The underlying page then loads as
normal. Does anyone have an idea about how I might do this?

View 3 Replies


ADVERTISEMENT

Backend Server Setup For Sending Message To Client?

Apr 13, 2009

Is it somehow possible to setup a backend server to send a message to a client? Or it is a client always have to establish a connection? What I'm trying to code is a simple chat script that sends a message to the client once a member of the chatroom has logged out. The only way that I can make this work is if the client either sends a message (which is a POST call) or when a time delay occurs (I've set a timer to run every 30s after the last GET or POST call). But both of these are basically CLIENT -> SERVER calls. I don't assume that the other way (SERVER -> CLIENT) is possible? no?

View 2 Replies View Related

Safari Not Sending Requests During The Onclick Event Due To New Page Load?

Jul 7, 2010

I have a site which displays a selection of advert listings. We log the number of clicks each advert receives via ajax requests.The listings link to both internal pages on our site and external pages, hence the ajax - we cannot log the'clicks' by logging the requests on the destination pages as these are not all on our site for us to log. Also, I don't want to potentially get false positives e.g.from bookmarked pages - hence I am logging the actual clicks, not the requests on the destination.

All is OK in most browsers, but there is a problem with Safari (I am running Safari 4.0 on Windows XP running in Virtualbox OSE) but only where the destination is to open in the same window/tab (some listings go to a new window, some don't). I am logging clicks via an ajax request in the onclick event, which is working fine when the listing is to open in a new window, but it appears that when a new window is not to be opened, the ajax never gets sent.A have constructed the following minimal test case:

index.html

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" [code].....

Note the line commented '****' in index.html which cancels the action of the link. When this is not commented out, the ajax request is sent correctly. Without it (the desired situation) the ajax request never gets sent. Its as if Safari saves up the ajax requests to do later, but never sends them as the new page cancels all such 'saved up' actions.I am using the Safari web developer tools, but I have also checked this test case by checking the Apache logs. Note that as a test case I don't pretend that it will work in IE, but it should work in standards compliant browsers and has been tested on Firefox 3.6.6 and Opera 10.6. The Apache logs show that logger.txt is being requested, unless it is already in the browser cache.Possible workarounds I've considered, but would prefer to avoid:

On the site in question the only such links that currently open in the same window are internal, so I do have the option of logging safari clicks by logging these requests as opposed to clicks and checking the http referer on the server side. As this is not a very flexible solution as it relies on these specific circumstances, also relies on all other links successfully making a new window, and furthermore relying on http referer could result in false negatives I'd rather find a solution within the javascript.I haven't checked whether an asynchonous request would work, but I don't wish to do this anyway just in case there is ever a server problem that prevents the response coming back (note that for these purposes the response is actually superfluous - we are sending the server a message but don't need anything back). I also want to avoid the delay in sending the user to the destination - there is no point having to wait for a response we don't need.Lastly, and my prefered workaround unless I can find anything better, is to make Safari (only) open all links in a new window anyway.

View 1 Replies View Related

Hiding Status Bar Message During Load

Apr 20, 2006

I have a hyperlink that opens a new window. I have used the following events to control the status bar:

Code:

<a href="..." onmouseover="window.status='Click Here'return true;" onmouseout="window.status=''>....</a>

This works fine, but when the user clicks the link, the actual URL is displayed in the status bar (if the user clicks and holds the mouse button it displays until they release).

Is there a way to stop the message appearing altogether?

View 7 Replies View Related

JQuery :: Load Message While A Page Is Loading?

Mar 2, 2010

Is it possible to "Only" display a loading message and hide all page's elements and graphics until the page is fully loaded. then loading message disappear and the content fades in!?[code]...

View 4 Replies View Related

JQuery :: Display Waiting Message On Ajax Load?

Aug 31, 2011

Is there any way to display any kind of ajax waiting message when making an ajax call?

View 2 Replies View Related

How To Avoid ActiveX Message Box Popup On Page Load

Oct 21, 2009

I'm using an ActiveX control in my html page.. Each time i load the page ie pops a message box to allow the activex to run or not. Is there any way to handle that message box using javascript. Or is there any other way to avoid that message box because each time the page loads I have to give yes and then proceed. By default I've to give yes is there any way to handle that using javascript.

View 1 Replies View Related

Getting A Button On A Modal Message To Open Up Another Modal Message?

Feb 12, 2010

I am new to Jquery and am having trouble. I want a button on a modal form to open up another modal form but for some reason it isn't happening. The code below is basically the code from the jquery user interface demo, slightly modified. can anyone tell me what I am doing wrong? if your kind enough to take a look at my problem make sure you change the src's where the JQuery files are!

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

[Code]...

View 2 Replies View Related

Form Sending Twice

Jul 23, 2005

I have a form that calls a perl script. A few javascript routines in
the form do a few things prior to submitting. For some reason,
however, the perl script is being called twice (the perl script sends
out an email, and submitting the form once results in two identical
emails.)

Here are excerpts from the script that I believe to be relevant (I can
post more if this isn't enough, but it's long and I'm trying to keep
it brief.) Can anyone tell me what I'm doing wrong? I've read about
how you need to return true after calling the javascript via a button
click, but I've done this kind of thing in other places and it's
worked fine. I've also tried inserting a return statement here in the
function and it doesn't seem to make a difference. Strange. (BTW, I
changed the domain name in the URL out of courtesy to my client, just
FYI.) Code:

View 2 Replies View Related

Sending Email

Mar 27, 2006

How i can send e-mail using JavaScript?

View 11 Replies View Related

Sending Option Value In Php?

Feb 19, 2010

I am using triple ajax dropdwon in my php file.In my form i have species_scientifc_name & on select I am sending its id to a php file for retriving data for second dependent dropdown box, Here I need to get this id in form action file.

View 1 Replies View Related

Ajax :: Sending More Than The Value

Nov 8, 2009

I am an avid php developer and i am starting to get into ajax so i can keep file sizes and code down to a minimum.

I am looking in the w3schools ajax examples but i am a little lost at how to send through a variable to the page i am using to process.

What i would like to do is send through an id that is being recalled from the database to tell it what to save over.

ajax:

View 4 Replies View Related

Sending Variable To Php ?

Jan 10, 2005

I'm using a js menu like this:

slideMenu.makeMenu('top','OKP')
slideMenu.makeMenu('sub','Level A','../OKP/KlassementOKP.php?level=A','mainFrame')
slideMenu.makeMenu('sub','Level B','../OKP/KlassementOKP.php?level=B','mainFrame')

As you can see I send the variable level=A to php on next page. What I would like is send another variable for the TOP item: OKP How should I do that ?

View 2 Replies View Related

POP Up Closing And Sending

Feb 10, 2005

i have a some code
<form><td colspan=&#392;'><input type='button' onClick=javascript:window.open("calendar.php","name","attributes") name='button' value='Book' /></td></form>

(it is echoed in php)

the thing is when a link is clicked on the pop up i want it sent back to the original page and the pop up closed..

View 2 Replies View Related

Sending An Array From Php To Javascript

Mar 29, 2006

i have made an application in php so that people can make, on the fly, a
form. when they submit the form there is a javascript formvalidation.

because we do not know how many fields there are in the form (it is made on
the fly) i collect all the form fieldnames in an php array and sent it to
the javascript function: Code:

View 5 Replies View Related

Sending Params Through POST

Sep 20, 2006

Is there anyway I can link a piece of text through a URL, while passing
parameters to it, but through POST (so that the clients can't see what
params im passing)? I want to do this without using forms, like:

<a href='view.php?questionID=9'>Click to view</a>

Except it would be posted. Is this possible?

View 1 Replies View Related

Sending Mail Using Javascript

Jul 20, 2005

I'm would like my app to send a preformatted email(with subject and
body) everytime a user pushed a button, like : onclick "
mailto:this@that.com" , without the user seeing anything, i.e. not
being able to edit the message.

Using php, this is very simple; mail("this@example.com", "Subject",
"Line 1
Line 2
Line 3");

is there a way to do this the same, easy way using javascript?

View 4 Replies View Related

JQuery :: Getting The Text From A Li And Sending It To Another Li?

Apr 9, 2011

I have this case:

1) There are 2 tipes of li: li.chosen that contains a single string. This string will be replaced frequently.

2) Each li.pick when clicked must send its text to li.chosen, but first the string of li.chosen must be erased. In short words, I want this list to act as a selector.

[Code]...

View 2 Replies View Related

How To Make Sending That Var Work

Jun 5, 2009

function ajaxFunction4(){
document.getElementById('ajaxDiv4').innerHTML='uploading...'
var ajaxRequest; // The variable that makes Ajax possible!

[code]....

View 2 Replies View Related

Ajax :: Sending An Xml Conetnt ?

Dec 9, 2009

My server has an xml configuration file which I want to receive to my browser. I can do HTTPrequset directly to the file config.xml and get it in the responseXML, but I want to do it im more secure way, so the post request will be to some script ("python" in my case), which will open and read the file.

If my xml file looks like this:

What shoud be the content of the response?

View 4 Replies View Related

Sending An Email By Javascript

Jan 10, 2006

I am using a javascript to format an email, the problem is that when the user clicks the submit button they are presented with the email and they have to click send in the email. Is there anyway to do this without the email being shown to the user?

I am able to do it using a simple mailto: but this prevents me from formatting the body of the email and other functions I need.. Code:

View 5 Replies View Related

Sending A Form By E-mail

Oct 23, 2000

I want to get IE5 to send the contents of an HTML form by e-mail using Outlook. I know that the basic idea is to make the recipients' e-mail address the Action. I can make a blank message open addressed as required but I can't get the user's input to appear in the message body.

View 9 Replies View Related

Sending A Variable To Another Page

May 17, 2004

I have a page with a form that a user completed. When they hit submit this calls some javascript. This javascript stores some XML in a variable and inserts the values from the form into the correct parts of the XML.

What I need to do is submit this XML or variable to another page. in effect, the use ris submitting the form to generate some XML then i want to send this XML to another page.

here is the code I have so far:

PHP Code:

<html>
<head>
<script>
function thename(){
var username = form1.username.value;
var password = form1.password.value;
var phone = form1.phone.value;

theXML = "<?xml version="1.0"?>
<novo-xml>
<register>
<client-id>test</client-id>
<password>" + username + "</password>

<user-id>" + password + "</user-id>
<phone-num>" + phone + "</phone-num>
<app-id>test</app-id>
<channel>I</channel>
<user-type>upgrade</user-type>
</register>
</novo-xml>";

//I was using this alert to display the XML
//alert(theXML);

}
</script>
</head>
<body>
<form name="form1" onsubmit="thename();">
username <input name="username"><p>
password <input name="password"><p>
phone <input name="phone"><p>
<input type="submit" name="submit">
</form>
</body>
</html>

View 9 Replies View Related

Sending A Value To Parent Window

Oct 2, 2004

On the main window, you click a link and it pops up another window, where you can do some stuff, and ultimatly you get a variable that has some value to it. Now, when the user clicks "All Done", I want that variable value to be become the value of a hidden input "attachments" back in the main window.

Code:

<script language="javascript">
function sendUploads() {
var newValue = &#392;'
parent.document.addform.attachments.value = newValue;
}
</script>

The main window's form is called "addform" and the hidden input is called "attachments".

View 1 Replies View Related

Sending Parameters To XSL Via Javascript

Feb 13, 2006

I am new to XSL and was wondering how I would send a parameter to my XSL stylesheet?

I currently am using this Cross-Browser XML/XSLT javascript code to perform my transformations. Code:

View 1 Replies View Related

Sending Data To Php W/ AJAX

Nov 16, 2006

I'm having a weird problem, not sure if I'm overlooking something or leaving something out. I'm trying to send values of a form to through AJAX to a php script then return a value. It works fine, except the author field is always blank. I've created a simplified version and it still works weird.

This is the javascript used to get the values and send them, when they come back the alert message shows Name as blank. I've looked in the PHP file to see if I made a mistake but I don't see anything.

function postComment() {
var author = document.getElementById("author").value;
var email = document.getElementById("email").value;
var comment = document.getElementById("comment").value;
var url = "includes/testComment.php";
request.open("POST", url, true);
request.onreadystatechange = showResult;
request.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
request.send("author="+escape(author)+"&email="+escape(email)+"&comment="+escape(comment));}

function showResult() {
if(request.readyState == 4) {
var message = request.responseText;
alert(message);
}
}

HTML Code:
<form>Name:<br />
<input type="text" id="author" name="poster" size="25" /><br />
Email:<br />
<input type="text" id="email" name="email" size="25" /><br />
Comment:<br />
<textarea cols="36" rows="7" id="comment" name="comment"></textarea>&nbsp;
<input type="button" onclick="postComment();" name="submit" value="Comment" /></form>

PHP Code:

$author = trim($_REQUEST['author']);
$email = trim($_REQUEST['email']);
$comment = trim($_REQUEST['comment']);
$response = "Name = ".$author." email = ".$email." comment = ".$comment;
echo $response;

View 21 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved