627 Posted Topics

Member Avatar for TheFearful

Get rid of the `$(document).ready(function(){...});` "wrapper". You need that only when you need to execute something as soon as the page has loaded. In your case, by the time the user selects something, the page is already loaded, so you just need to make the `load()` method call immediately. function …

Member Avatar for hielo
0
543
Member Avatar for toxicandy

> but the javascript is still giving me an error with the obj = JSON.parse(ret); That's because on line 16, you supplied the `dataType: 'json',` option. By doing so, you are telling jquery that the data you are sending from the server is JSON. As a result, when the request …

Member Avatar for hielo
0
2K
Member Avatar for Annuscha

On line 11 you have: $('.codeForm tr:last div[id="status"]').attr('id', '#status' + counter + ''); which ends up generating `<div id="#status">...</div>`. Get rid of the hash symbol. You need the hash symbol only when using selector expressions for jquery, not for the actual ids of the elements. It should be: $('.codeForm tr:last …

Member Avatar for hielo
0
359
Member Avatar for Ivan_10

try: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^/?index\.php\/(.*)$ /index.php [R=301,L] </IfModule>

Member Avatar for hielo
0
143
Member Avatar for Aeonix

`is_int(1)` should return `true` since 1 is an int primitive. However, `is_int("1")` should return `false` because you are checking a `string` (that happens to have a numeric character, but is a string nevertheless). A form's input (as in `$_POST['id']`) or url parameter (as in `$_GET['id']`) is always a string, even …

Member Avatar for cereal
0
274
Member Avatar for mattyd

>I find some of the OO aspects a bit confusing: It seems that an image is turned into an object simply to be able to process it from within an array, programatically. If I am not mistaken, you are referring to lines 17- 23 on your original post. If so, …

Member Avatar for mattyd
0
303
Member Avatar for James_43

Try: var commentContent = $('textarea.comment-box#comment'); commentContent.keydown(function(e){ /* see: http://www.quirksmode.org/js/events_properties.html */ var code; if (!e){ var e = window.event; } if (e.keyCode){ code = e.keyCode; } else if (e.which){ code = e.which; } if( code == 13 && !e.shiftKey && commentContent.is(":focus")) { e.preventDefault(); commentForm.submit(); } });

Member Avatar for hielo
0
225
Member Avatar for lionburn50

There could be various reasons. To name a few: 1. Invalid/Wrong path to the stylesheet 2. Invalid characters in the stylesheet 3. Improper syntax 4. Insufficient Permissions on the file Open the XSL file directly through FF. If the problem is any of 1-3, then it will tell you on …

Member Avatar for Squiva
0
2K
Member Avatar for Clarkeez

try: [CODE=html] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>JQuery Form Example</title> <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script> <script type="text/javascript"> $(function(){ $('#myform').bind('submit',function(){ $.post('process.php', $("#myform").serialize(), function(data) { $('#results').html(data); }); }); }) </script> </head> <body> <form name="myform" id="myform" action="" method="POST"> <!-- The Name form field --> <label for="name" id="name_label">Name</label> <input type="text" name="name" …

Member Avatar for udara86
0
781
Member Avatar for shreyassv

To answer your question, first obtain a reference to your table. If you have your table an id: [icode]<table id='MyTable'>...</table>[/icode] then use [icode]var t = document.getElementById('MyTable')[/icode] to obtain a reference to the table. Since 't' now holds a reference to the table, then assuming you are interested in the x+1th …

Member Avatar for madhuri91
0
1K
Member Avatar for Refrigerator

count is a keyword, so you MUST wrap it in backticks. As a matter of fact, it is better if you always put backticks around your field and table names, that way you will always avoid this problem: NOTE: The general syntax is: [iCODE]UPDATE [COLOR="Green"]`TableName`[/COLOR] SET [COLOR="green"]`fieldName`[/COLOR]='value'[/iCODE] Based on what …

Member Avatar for gabrielcastillo
0
299
Member Avatar for Moderns

[QUOTE] then when I send the paragraph to my mobile phone, I get 162 characters[/QUOTE] see if you have a javascript onsubmit function that changes carriage returns and/or new lines to spaces before submitting. Also, check (for the same thing mentioned above) on the server script to which you are …

Member Avatar for Andrea_1
0
4K
Member Avatar for meempat

change: [CODE]mysql_select_db("lola", $con);[/CODE] to: [CODE]mysql_select_db("lola", $con) or die( mysql_error() );[/CODE] Most likely the user aby does not have any privileges on the lola db.

Member Avatar for diafol
0
5K
Member Avatar for mbarandao

Try changing `include('../../../datalogin.php');` to `require_once('../../../datalogin.php');` to make sure that the file is actually being included.

Member Avatar for mbarandao
0
427
Member Avatar for jackbauer24-2

> Test this code For that, you will need to provide the missing javascript file (grid.js). Are you sure you have the correct name/path to the grid.js file?

Member Avatar for jackbauer24-2
0
242
Member Avatar for jonnahealey

For the sake of clarity, let's say that your site is jonna.com and that your database.mdb is located at jonna.com**/Databases/database.mdb**. try: 'Get the 5 newest news items Set conob2 = Server.CreateObject("ADODB.Connection") conob2.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("/Databases/database.mdb") & ";" Set objRec2 = Server.CreateObject("ADODB.Recordset") Dim sql2 sql2="SELECT TOP 5 news_date, news_text …

Member Avatar for hielo
0
167
Member Avatar for deadsolo

Try: $lines = file(getcwd().'/data.txt'); foreach( $lines as $line) { if( preg_match('/^In our tests\D+(\d+)\D+(\d+)/',$line,$matches) ) { print_r($matches); } } If there are any matches, then the variable ***$matches*** will contain the data you are after.

Member Avatar for deadsolo
0
295
Member Avatar for bilal.saim

You need to do the iteration on the server (via PHP). Since all four of your PHP array have the same number of elements, iterate over one of them and use that numeric index to retrieve the equivalent element from the other arrays. Try: <?php $tipi = array("asd","222","dda","xcs"); $gun = …

Member Avatar for bilal.saim
0
240
Member Avatar for DavidB

You have the right syntax. Just save your program as eigenValues3.js and then if you want to write a program that needs that file you just "import" it as follows: [code] <html> <head> <script type="text/javascript" src="eigenValue3.js"></script> <script type="text/javascript"> //The code that will use the functions in eigenValue3.js goes here </script> …

Member Avatar for goldentuna
0
281
Member Avatar for cjay175

You are currently doing: [CODE=javascript] if( conditions ) { ... required: true ... } [/CODE] If you look closer at your working example, your required is NOT true|false, it is a reference to a function that returns true or false. So, instead of what you have (and is not working) …

Member Avatar for weblike
0
3K
Member Avatar for sha1023012

A. at the end of line 17 you have [iCODE]horizontal[fishPos[fishNumber] [/iCODE]. That's a syntax error. You are missing a closing bracket after [iCODE]fishNumber[/iCODE]. B. On line 24 you have [iCODE]setInterval(fish1Swim, 100);[/iCODE], but there is no such thing as [iCODE]function fish1Swin(){...}[/iCODE] declared anywhere, so I don't see how you can claim …

Member Avatar for aquariums
0
217
Member Avatar for foysal2012

try: [CODE=html] <!-- make sure you put the [] at the end of the name --> <input name="searchterm[]" /> <input name="searchterm[]" /> <input name="searchterm[]" /> [/CODE] then try: [CODE=php] <?php //connect to the db first $conn=mysql_connect('...', '...', '...') or die(mysql_error()); mysql_select_db('...') or die(mysql_error()); foreach($_POST['searchterm'] as $i=>$v) { if(preg_match('#\w#',$v)) { $_POST['searchterm'][$i]=mysql_real_escape_string($v); …

Member Avatar for foysal2012
0
144
Member Avatar for Q8iEnG

Load the page in your browser. Then view the source code. Within the source code look for: #D50512 That is the "red" color that you are seeing.

Member Avatar for Q8iEnG
0
261
Member Avatar for learner guy

If the XML file you are retrieving has invalid markup, then on line 20 [iCODE]xmlDoc[/iCODE] will be set to null. If that is the case, then [iCODE]xmlDoc.getElementsByTagName()[/iCODE] will give you the error you are describing. So, you need to make sure that the responseXML is not null. On your XML …

Member Avatar for Troy III
0
1K
Member Avatar for raul8

before you begin the delay, try "capturing/recording" a reference to "[iCODE]this[/iCODE]" in some variable so that your delayed function actually knows what "[iCODE]this[/iCODE]" means: [CODE=javascript] $(".tabButton").click(function() { var self=this; $(self).css("background-color", "white").delay(500, function() { $(self).css("background-color", "black"); }) }); </script> [/CODE]

Member Avatar for ckchaudhary
0
352
Member Avatar for chicnstu012

try: [CODE=php] $result = mysql_query("SELECT * FROM comments") or die(mysql_error()); while( $row = mysql_fetch_assoc($result) ) { echo $row['alias'], ': ', $row['comment'], '<br />', PHP_EOL; } [/CODE]

Member Avatar for diafol
0
99
Member Avatar for gilgil2

`<input name="name"... />` should be `name="username"... />`. You your comment: `// Set cookie / Start Session / Start Download etc...` is inaccurate. You need to start the session BEFORE you even begin sending any output. That means that you cannot start the session after you have send `<html>...` Try the …

Member Avatar for Stefano Mtangoo
0
221
Member Avatar for Nathaniel10

Check your file case. In other words, if your folder/file is named Style (uppercase "S"), make sure you are not using `< (...) href="../style/style.css">` (lowercase "S")

Member Avatar for Nathaniel10
0
225
Member Avatar for gilgil2

try: [CODE=php] <?php session_start(); $redirectTo='http://yoursite.com/page.php'; $DEBUG=true; $SELF=basename(__FILE__); $err=''; $match=0; if(isset($_POST['username']) && !empty($_POST['username']) && isset($_POST['password']) && !empty($_POST['password'])) { $link = mysql_connect('localhost', 'username', 'password') or die('Could not connect: ' . mysql_error()); mysql_select_db('database') or die(mysql_error()); $username = mysql_real_escape_string($_POST['username']); $password = mysql_real_escape_string($_POST['password']); $sql="SELECT `active` FROM `users` WHERE `username`='".$username."' AND `password`='".$password."'"; $search = mysql_query($sql) or …

Member Avatar for Stefano Mtangoo
0
191
Member Avatar for phoenixfire2

try: [CODE] <?php $datearray=explode('-','1980-09-28'); $days=str_replace('>'.$datearray[2],' selected="selected">'.$datearray[2],preg_replace('#option>(\d+)#','option value="$1">$1','<option>'.implode('</option><option>',range(1,31)).'</option>')); echo '<select name="day">'.$days.'</select>'; ?> [/CODE]

Member Avatar for phoenixfire2
0
433

The End.