Tag Archives: javascript

writing JavaScript with PHP

I am trying to right some some JavaScript to define a variable using PHP. The variable has a little jQuery in it which should get rendered by the client. I say “should” but really mean I want it to. What… Continue reading

Tagged , | Leave a comment

modal dialog jquery rules

Dear all
I’m a newbie in PHP, jQuery and bad in English.
I want to ask about jQuery modal dialog rules, from database. This is my database:
Database picture
This is my code: Javascript rules and jQuery Validate without the… Continue reading

Tagged , , , , | Leave a comment

Javascript form won't submit

I have been using the uploader as provided by http://www.hoppinger.com/blog/2010/05/28/file-upload-progress-bar-with-phpapc-and-javascript/ and have since applied it to one of my forms and whilst the progress meter works, the submit function doesn’t fire on successful upload.
The full code of what I… Continue reading

Tagged , , | Leave a comment

Sending array as one variable from JavaScript to PHP

I have a form, and the URL is like this:

http://hostname/projectname/classname/methodname/variablename

And in my JavaScript, I fill an array like this:

var currentrelations = new Array();
    $(".ioAddRelation").each(function(index) {
        currentrelations[index] = $(this).html();
    });

And this array has two values ['eeeeee','eeeeee']…
So Continue reading

Tagged , , , , | Leave a comment

Php variable to Javascript variable [closed]

I want to pass $json to my javascript file, so I can use the variable ‘HeyHey’ in javascript. I have already converted it into a javascript variable ‘text’ but I dont how how to link the variable in the javascript… Continue reading

Tagged , | Leave a comment

Jquery tabs keep tab open that is subid in url

i am using jquery tabs, and trying to get pagination in each one, everything works fine however, if i click to go to the next page on say the second tab, it does it fine, but transports me to the… Continue reading

Tagged , , , | Leave a comment

<select> dropdown output my MYSQL data properly using JS function

I have a JS/PHP piece of code that selects from a database, does some things with the ID’s of the tables and outputs the data in a dropdown.
My JS currently appends myfile.php?cat=X&projectID=Y… correctly and i’m grabbing the variables correctly, Continue reading

Tagged , | Leave a comment

Hover Popups with Additional links on Image

I am trying to build a page where i am having an image. Now I want to do a task that when ever mouse is taken over a certain part of image , that image with some links popup as… Continue reading

Tagged , , , , | Leave a comment

Backbone.js: Save Method Always Return Error Callback

I know people probably will get real confused why I am not using rails but I feel better using php thus I’ve picked it. I’m basically trying to create a really simplebackbone.js. I’ve predefined the urlRoot and url… Continue reading

Tagged , , , | Leave a comment

What is the best way to put a Json string in a html tag?

What is the best way to put a json string (encoded php array) into an html tag?

<?php
$content = array(key1=>'value 1', key2=>'value 2');
?>
<span class="someclass" data="<?php echo(json_encode($content)); ?>">Stuff Here</span>

This isn’t valid because when it’s encoded it will Continue reading

Tagged , , , , | Leave a comment
137 pages