[jQuery] Auto close dialog after 5 seconds ?

2009-09-24 Thread spstieng
Hi. I'm using jQuery.dialog and I'm wondering if it's possible to auto close it after e.g. 5 seconds.

[jQuery] Re: Autocomplete - Problem accessing php file

2009-05-14 Thread spstieng
Alright! After about 20 hours of research, I found the answer in a blog by Ryan Pharis (link above). As I was suspecting, it was an easy solution. Wordpress is using "user friendly URLS". Therefore my path ended up like this: http://www.mysite.com/includes/autosuggest.php?json=true&; The REAL pa

[jQuery] Re: Autocomplete - Problem accessing php file

2009-05-14 Thread spstieng
It's so fun answering my own posts :) Well, I have dug out this: http://ryanpharis.com/2008/10/ajax-for-wordpress-plugins-using-jquery/ http://amiworks.co.in/talk/simplified-ajax-for-wordpress-plugin-developers-using-jquery/ I will give this a go and see how I progress.

[jQuery] Re: Autocomplete - Problem accessing php file

2009-05-13 Thread spstieng
Progress! The main script (autosuggest) is triggering now in Wordpress. But now I'm having problems getting the script to locate the "get_labels.php" script. I'm using "user friendly" urls. My permalink is set up to http://www.mysite.com/ %category%/%postname %. So if I'm reading a post called H

[jQuery] Re: Autocomplete - Problem accessing php file

2009-05-13 Thread spstieng
Alright. I found the problem. In my get_labels.php, I was . This ahad to change to ../afile.php So now "includes/get_labels.php?json=true&" is working. Now comes the real problem. I need this to work in a template I'm making in Wordpress. So far, it looks lke the main script isn't triggering. I

[jQuery] Re: Alternating Row Colors: Last row not coloring

2009-05-13 Thread spstieng
The only js code I use is this: jQuery("#myTable tr:even").addClass("even"); Then in my CSS file, I define what background color the .even class will have. Steven On 13 Mai, 22:25, MorningZ wrote: > You have > > -- > $('#event-listing tbod

[jQuery] Autocomplete - Problem accessing php file

2009-05-13 Thread spstieng
Hi, I have the following script in my index.php file: var options = { script:"get_labels.php?json=true&", varname:"input", minchars: 2, delay: 200, json:true, shownoresults:false,

[jQuery] jQuery.ajax form submission to MySQL

2009-05-12 Thread spstieng
Hi guys. I'm using Wordpress CMS where I have created a custom form. I would like to store the input from this form in a database (MySQL). I've posted my problem here: http://stackoverflow.com/questions/852054/store-form-data-in-mysql-with-jquery-ajax , but I think maybe this forum is a better p

[jQuery] Re: jQuery.post() not working for me

2009-04-16 Thread spstieng
Ok, I found the answer. It was as simple as doing this: alert(data[0].name); Notice the [0]. So here is the functional code for anyone who is wondering about this: javascript file --- jQuery(document).ready(function() { jQuery('#storeListTable tr').click(function() {

[jQuery] Re: jQuery.post() not working for me

2009-04-16 Thread spstieng
Ah, got it. The Post is correct and the Respons is correct... I think. It's in JSON, but not sure if it's correct. According to http://docs.jquery.com/Ajax/jQuery.post, last example, they have the following line in the php file: "John","time"=>"2pm")); ?> This is why they can output the info by

[jQuery] Re: jQuery.post() not working for me

2009-04-16 Thread spstieng
I haven't figured out how to use this yet. How can I debug a javascript file? I only see the html code from my index.php. (I have lots of experience using debugger tool in Visual Studio) Steven On 16 Apr, 15:19, Donny Kurnia wrote: > Try running it in firefox with firebug extention. Open the

[jQuery] Re: jQuery.post() not working for me

2009-04-16 Thread spstieng
vascript, > but then you have to do something like > > $func = $_POST['func']; > $storeID = $_POST['sID']; > call_user_func ($func, $storeID); // Not sure about the syntax here, > but something like that > > ..because "func" is just another parame

[jQuery] Re: jQuery.post() not working for me

2009-04-16 Thread spstieng
innerHTML;". I guess I should pass it as parameter: jQuery.post("../ functions.php", { func: "getStoreInformation", sID: storeID } But I don't think I can use " sID: storeID ". Steven On 16 Apr, 14:13, Josch wrote: > Do you get an empty alert or nothing? >

[jQuery] jQuery.post() not working for me

2009-04-16 Thread spstieng
Hi, I'm trying to use jQuery.post() function to retrieve som data. But i get no ouput. My PHP file looks like this: getStoreData($storeID); while ($row = mysqli_fetch_assoc($result)) { { $arr[] = $row; } $storeData = json_encode($arr); echo $storeData; //Output JSON

[jQuery] Re: Highlight table row

2009-04-15 Thread spstieng
        $(this).addClass('highlight'); >      }, >      function() {  // mouseout >           $(this).removeClass('highlight'); >      } > ); > > On Apr 14, 11:51 am, spstieng wrote: > > >

[jQuery] Highlight table row

2009-04-14 Thread spstieng
I've tested different solutions found in here, and on the web, but I can't get it working. I simply want to highlight a table row. I would like to you toggleClass $(this).parents('tr').toggleClass("highlight"); This is my HTML code: Title ID Navn

[jQuery] Re: jQuery.Accordion - how can panels stay open?

2009-01-05 Thread spstieng
On 5 Jan, 13:56, "Jörn Zaefferer" wrote: > http://docs.jquery.com/UI/Accordion#What_this_isn.27t > > Jörn > > > > On Mon, Jan 5, 2009 at 11:30 AM, spstieng wrote: > > > I'm successfully using the accordion herehttp://www.norwegianfashion.no > > (right

[jQuery] jQuery.Accordion - how can panels stay open?

2009-01-05 Thread spstieng
I'm successfully using the accordion here http://www.norwegianfashion.no (right side below videos). My question is: How can I leave a "panel" open after it's been clicked? If 'Andre lenker' is open and I click 'Designskoler', 'Andre lenker' panel is closed and 'Designskoler' opens. Offcourse I w

[jQuery] Re: Noob Q. Can't get jQuery working

2009-01-02 Thread spstieng
unction(){ code here }); it worked. I will offcourse move this scrips to a js. file Now for doing the same test with Drupal. Steven On 2 Jan, 02:39, Ricardo Tomasi wrote: > I think Wordpress loads prototype.js as well, try protecting your > jQuery script: > > jQuery.noConf

[jQuery] Re: Noob Q. Can't get jQuery working

2009-01-01 Thread spstieng
and therefore jQuery is not > actually loaded. > > > > On Thu, Jan 1, 2009 at 5:26 AM, spstieng wrote: > > > Now, clicking Test B links dislays the 'Hello World' alert. > > But nothing happends when I click Test A. Why is that?

[jQuery] Noob Q. Can't get jQuery working

2009-01-01 Thread spstieng
Ok, this is a noob questions. I'm using Wordpress and have the following code. In the header I add: The test javascript contains: $(document).ready(function() { $("a").click(function() { alert("Hello world!"); }); }); function msg(txt) { alert(txt); } In my test php file I have: