Skip to content
Advertisement

Tag: javascript

Can you call JavaScript function from PHP loop?

I am wounding if I can do this, as I am trying this from last 2 days but no success. I want to run JavaScript function from PHP PHP example JavaScript I am trying to generate a page which print loop number one by one. But I got error jfun is not defined. What I can understand my JavaScript function

How does onchange carry selected text and hidden value?

I have a dynamically populated PHP dropdown menu that gathers the following information from the database: I then have a JavaScript function that shows the selected text – description in an input box for editing and then on submit update back into the database. Question: Is there away using JavaScript that I could pass the id and description together but

jQuery Ajax post to php not catching variable

What am i doing wrong. PHP doesn’t seem to catch title and wrapper from $.ajax. Does the code look correct. The success message i get indicate an error that title is not found. jQuery main.html PHP process.php Answer Take a look: jQuery.ajax() The data parameter is better to be a Key/Value pairs object, it’s cleaner and easier to debug 🙂

Populate table contents from PHP array using AJAX

I have a table as below; and a PHP file, ajax.php for AJAX calls as; The PHP function is suppose to return an array with a limited number of elements with respect to $_POST[“page”] like in pagination. The script will return first 5 elements for $page = 1, second 5 elements for $page = 2, etc..etc.. When page loads, the

document.referrer – limitations?

I am unable to get a lot of referral URLS using document.referrer. I’m not sure what is going on. I would appreciate it if anyone had any info on its limitations (like which browser does not support what) etc. Is there something else i could use (in a different language perhaps) that covers more browsers etc? Answer Just to make

get all child element of a form in J.S

how can i get all child element(like radio,checkbox,select,text,…) within a form and make them blank using javascript. My form has many other elements like table,div etc. but i dont want to changes on these other element. Any suitable idea to get these child element(form element) through the form name(frmlist) or form id(frmlist) and make them blank. Actually i have no

PHP XSS sanitization

Questions: What are the best safe1(), safe2(), safe3(), and safe4() functions to avoid XSS for UTF8 encoded pages? Is it also safe in all browsers (specifically IE6)? . Many people say the absolute best that can be done is: . . There are a hell of a lot of posts about PHP and XSS. Most just say “use HTMLPurifier” or

jQuery WYSIWYG Reccomedations

I am looking for a WYSIWYG editor that matches a few requirements. ability to customize toolbar ability to customize styles of headings/paragraphs, extra styles in dropdown, etc ability to upload image (to a pre-defined folder on the same server. I do not want a full fledged file manager, just a “select image -> upload image” system) ability to do an

Advertisement