- This topic is empty.
April 7, 2011 at 1:38 am #32265
Done a search and could not find an answer to this question : Help as always much appreciated.
I have a PHP doc and I’m trying to load the contents of this into a content div on one of my main pages like so :
Now the content of the PHP file is just a simple form that will be posted to itself for validation.
Hope I make sense .
Anyone seen this ?
I was wondering if it isn’t because the main page’s head section is loaded as a PHP include ( header.php )…. but surely that shouldn’t matter ?
Thanks again for any help offered.April 7, 2011 at 2:03 am #51892
I think I know why …..
If I am – does this mean that it is not a good idea to load a form using the JQ load() function into an element of another page ( Ajaxing )?April 7, 2011 at 2:05 am #51883April 7, 2011 at 2:53 am #51884
jamie – how is that going to solve my issue.
PS. I found that by doing a $.getScript(“mycustomscript”); seems to work, but it dosn’t seem to be the most elegant way of doing it. It also confirms that my problem lies in the fact that the dom is not refreshed by the load() function and therefore my custom script is not read in the head tags hence why my buttons and things do not fire…..April 8, 2011 at 2:58 am #51826jamygoldenMember
Not sure if you have sorted this issue out by now, i usually use the $.get() method to load php files into my website. Otherwise post the code so that we can have a look at it.April 8, 2011 at 3:12 pm #51730
On a side note: I’m now hitting a brick wall with form validation that gets posted to a php file, checked and any errors sent back in json object format to the form – i kinda got it working, but …aaagghhhhhhhh……something just isn’t right….
I get this :
” Warning: in_array() [function.in-array]: Wrong datatype for second argument ….”
( not even google has any more answers for me LOL )
I kinda worked it out that the array is not an array, but it’s only NOT an array if one of the fields i send is NOT in the DB…
so frustrating…wish i had someone next to me to help me out with this……
anyone care to remote assist ? LOL !!! kidding
I’m absolutely determined to get it right – I’m learning SO much as I go ! I’m hooked on this – absolutely love it !!!!
this is the form I’m trying to make work !
http://test.epbudgerigars.com/members.php ( register bit )
I’m not even sure If i’m doing it right !, but it’s so much fun to struggle like this and BAM! finally get it working !