mshadow's Profile User Rating: -----

Reputation: 0 Apprentice
Group:
Members
Active Posts:
37 (0.04 per day)
Joined:
03-July 12
Profile Views:
1,148
Last Active:
User is offline Nov 10 2013 01:23 PM
Currently:
Offline

Previous Fields

Dream Kudos:
0
Icon   mshadow has not set their status

Posts I've Made

  1. In Topic: ajax post sends empty string

    Posted 29 Mar 2013

    View Postandrewsw, on 29 March 2013 - 12:00 PM, said:

    The 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
  2. In Topic: div working like an iframe

    Posted 25 Dec 2012

    hi 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......
  3. In Topic: div working like an iframe

    Posted 21 Dec 2012

    View PostKruithne, on 02 November 2012 - 07:16 AM, said:

    Hello mshadow,

    Quick question: Why? Why do you want a DIV to work like an IFRAME?

    Now, as I am here to help, not to question, on with the code! For this we need to delve into some Javascript and to make things a lot easier and cross-browser compatible I will be using jQuery as well.

    Let's assume the code below is your DIV in which will act like an IFRAME.

    <div id="magicBox"></div>
    


    Now we need need a Javascript function that we can trigger to render content inside this thing. (Don't forget to include the jQuery library)

    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
    <script type="text/javascript">
    	function OpenPage(url)
    	{
    		$.get(url, function(response)
    		{
    			$('#magicBox').html(response);
    		});
    	}
    </script>
    


    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.......

My Information

Member Title:
New D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Click here to e-mail me

Friends

mshadow hasn't added any friends yet.

Comments

mshadow has no profile comments yet. Why not say hello?