Jump to content

wubwubwub

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

wubwubwub's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello guys. I'm bothering you today with a newbie question: Is it possible, after clicking the "submit" button, not to launch a new php file (the file specified in the "action" attribute) but rather load it in a central div (which previously displayed the form) ? Something like: [form contained within a div] -> complete form -> submit -> load the file that handles the input values and MySQL storage -> do not open that new file in the browser but display it in the div. Thanks in advance.
  2. Thanks a lot for your input. It worked. The problem was with the jQuery library. I noobishly mistyped the filename in the script's src. Anyway, I face something different now. I'm not sure whether it has anything to do anymore with PHP, but since this topic is still open I'll give it a shot.. I tried adding a fade-out/fade-in effect when the content inside the #max_wrap div changes (when I click the links), but nothing really worked as expected. Some codes did the fade-out correctly, but not the fade-in. Some did both well, but during the transition the content below the #max_wrap div moved up (and down afterwards). This is what I used so far: $(document).ready(function(){ $("#c1").click(function(){ $("#max_wrap").fadeOut('slow').load("maintext.php").fadeIn("slow"); }); }); - This one loaded the php file (too fast), faded out, and faded in again. $(document).ready(function(){ $("#c1").click(function(){ $("#max_wrap").fadeOut('slow', function(){ $("#max_wrap").load("servprest.php", function(){ $("#max_wrap").fadeIn('slow'); }); }); }); }); - Fade-out and in worked well with this one, but caused the succeeding divs/elements to move up for a bit. Modifying it a bit, I came up with a version that doesn't cause the succeeding elements to move up. Also, it correctly executes the fade-out, but not the fade-in. Any suggestions?
  3. All I mean by tabs in this context is "loading content without leaving the page". I'm new to jQuery and I'm not sure what to do. I tried adding the latest version (of jQuery) in the script tag before using that code but it didn't work either. As previously posted, all I want is to load content in the "max_wrap" div when I click one of the links. What should I add or what code should I write ? Lateredit: Yes, I'm sure maintext.php is in the same folder and c1 is not assigned to anything else inside my code.
  4. Hello people. I'm working on a simple website and I'm trying to make the navigation tab-style (a div that changes its content when the user clicks a navigation link). The HTML looks like this: <div id="min_wrap"> <a href="#" id="c1">Link 1</a> <a href="#" id="c2">Link 2</a> <a href="#" id="c3">Link 3</a> <a href="#" id="c4">Link 4</a> <a href="#" id="c5">Link 5</a> </div> <div id="max_wrap"> </div> I've tried something I've found on stackoverflow: <script type="text/javascript"> $('#c1').click(function(){ $("#max_wrap").load("maintext.php"); return false; }); </script> but it didn't work. Nothing happens, the HTML i've written inside the PHP file does not appear inside the div. Any clue? Thanks for your effort.
  5. Hello. I have a newbie question regarding arrays: How can I echo an element's subsequent arrays and elements? For example $pers = array("Steve" => array("eyes" => "green", "age" => "43", "race" => "caucasian")); and if I echo $pers["Steve"] to make it display: green 43 caucasian. Thanks.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.