Reputation: 0 Apprentice
- Active Posts:
- 37 (0.04 per day)
- 03-July 12
- Profile Views:
- Last Active:
- Nov 10 2013 01:23 PM
- Dream Kudos:
Posts I've Made
Posted 29 Mar 2013The purpose of ajax is that you can send data to a PHP script (among other things). The PHP script would examine this data, and return some other data, that you can intercept and do something with, such as insert values into the current page.
Currently, when your request is successful, you are ignoring any returned data and, completely separate from your original request, attempting to load the page capture.php.
You need to clarify:
If you just want to post data to a PHP script, and display the page that this script creates, then don't use ajax: just use a standard HTML-form and POST data;
If you want to use ajax, so that you can post some data, and do something with the data that the PHP returns, then re-read the docs for jQuery-ajax.
the purpose of catch.php is that when it gets the inputs its comapres it with the inputs in database for login.....but due to this error it is unable to do so
Posted 25 Dec 2012hi guys,
<div id="apDiv1"><a href="#">first link</a></div>
now using jquery i am able to load a php page "two.php" in the div....but when i click the links in two.php it redirects to a different page which is supposed to happen. so i want to make my div work like an iframe......
Posted 21 Dec 2012Hello mshadow,
Quick question: Why? Why do you want a DIV to work like an IFRAME?
Let's assume the code below is your DIV in which will act like an IFRAME.
Now all we need to do is call OpenPage(page) and it shall do it's magic.
<a href="#" onclick="OpenPage('anotherPage.html');">Go to my other page..</a>
Please keep in mind that the function is restricted by the same origin policy therefore the page must be under the same protocol/domain/port etc.
it opened a php page in the div.....but when the linked in the php page was clicked .......it redirected to a different page.......
Posted 29 Oct 2012Keep in mind that HTML tag attributes are separated by spaces. If the entire attribute value is not enclosed in quote marks, the very first space encountered will be read as the separator between that attribute and the next attribute, even if that space happens to be inside quote marks.
Put simply, this is fine:
This, on the other hand, is not:
<a onclick=x('two words')>
The space acts as a separator, causing "words" to be read as part of the next attribute, not as a part of the "onclick" attribute. As a result, you end up with a syntax error, and the whole thing is ignored.
To moral of this story: Always enclose attribute values in quotes.
<a onclick="x('two words')">
Also, you can't use "new" as a variable name. It's a keyword.
- Member Title:
- New D.I.C Head
- Age Unknown
- Birthday Unknown
- Click here to e-mail me
mshadow hasn't added any friends yet.