Try adding [code="html"]
<input type="button" value="Test" onclick="drawOt hers({"size":["3"],"color":["black&whit e"],"position":["Run on page"]});" />[/code] to your html and test the function itself, see if there are any JavaScript errors.
User Profile
Collapse
-
Try alerting the vari1 variable inside the onreadystatecha nge() function
[code="javascrip t"]
xmlHttp.onready statechange = function()
{
if(xmlHttp.read yState==4)
{
alert( vari1 );
}
};[/code]Leave a comment:
-
Canabeez replied to How is it possible to select a value from a field but pass another value to the URL?in PHPWithout having much headache, i would just compile the players name with his team and position, something like this:[code="php"]
$players[] = array(
"id" => $row->id,
"name" => $row->name . " | " . $row->postion . "(" . $row->team . ")"
);
[/code]
but don't forget to update the MySQL...Leave a comment:
-
-
-
There's no need to use the GD library if you don't want to combine images. You can dynamically draw them on the page using either PHP of JS.
If you want to use PHP to output and image, then just:[code="php"]
<?php
ob_start();
$imageId = isset($_GET['img']) ? addslashes($_GE T['img']) : false;
if(!$imageId){
exit;
}
$result = mysql_query("
SELECT...Leave a comment:
-
Canabeez replied to problem with code to calculate total values in textboxes that are added dynamicallyin JavascriptSorry, I'm a mac user, unable to check on IE8 :/ are you getting some JS errors?
Show some php/javascript/mysql code for further assistance.Leave a comment:
-
Not sure what you mean, but here:[code="javascrip t"]
function validate(){
/* Option 1 */
if( $('#dropDownID' ).val() == 'something' ){
// Do something
}
/* Option 2 */
if( $('#dropDownID' ).attr('selecte dIndex') == '0' ){
// Do something
}
}[/code]Leave a comment:
-
Canabeez replied to problem with code to calculate total values in textboxes that are added dynamicallyin JavascriptHere, look into this, believe this might help you:[code="html"]
<script type="text/javascript">
function calculate(){
var textFields = document.getEle mentsByName('tx t');
var total = 0;
for(var i in textFields){
if(textFields[i].value){
total += parseFloat(text Fields[i].value);
}
}
document.getEle mentById('total ').value = total;...Leave a comment:
-
Canabeez replied to How is it possible to select a value from a field but pass another value to the URL?in PHPSorry, my bad... but that isn't the best solution because if the statistics are not selected, the form will not submit, but the player name would still change to player id.
Here, I believe this should do better:[code="html"]
<?php
include 'index.php';
$limit = 2000;
$sql = sprintf( 'SELECT name, id FROM players LIMIT %d', $limit );
$result = mysql_query( $sql );
...Leave a comment:
-
Try adding the server IP to the txt value of the sending domain, to confirm this server as an authorized sender for this domain.Leave a comment:
-
Try this:[code="javascrip t"]
if( document.getEle mentById('Uploa dTextType').sel ectedIndex == 0){
alert("Select \"Type\" options.");
document.getEle mentById('Uploa dTextType').foc us();
return (false);
}[/code]Leave a comment:
-
Are you getting any errors?
Please also check that the response from the second function ("drawOthers()" ) does not enter the first one ("drawMedia()") .Leave a comment:
-
Canabeez replied to How is it possible to select a value from a field but pass another value to the URL?in PHPHope I got you right.
Try this:[code="javascrip t"]
<?php
include 'index.php';
$limit = 2000;
$sql = sprintf( 'SELECT name, id FROM players LIMIT %d', $limit );
$result = mysql_query( $sql );
$players = array();
while( $row = mysql_fetch_obj ect($result) ){
$players[] = array(
"id" => $row->id,
"name" =>...Leave a comment:
-
Thank's for the "V", but i believe Markus's answer is better :)Leave a comment:
-
It's stupid, but did you try
[code="javascrip t"]
if (form.TextType. selectedIndex == 0){
alert("Select \"Type\" options.");
form.TextType.f ocus();
return (false);
}
[/code]Leave a comment:
-
Here, did some changes, try testing this and check if this works. Sorry for so many code changes.
HTML:
[code="html"]
<html>
<head>
<script type="text/javascript">
function createRequestOb j()
{
var xmlHttp = null;
if (window.XMLHttp Request){
xmlHttp = new XMLHttpRequest( );
if (xmlHttp.overri deMimeType) {...Leave a comment:
-
You can surely do that with JSON, I believe that changing the protocol would be handled as a cross-domain request which is not allowed in AJAX.Leave a comment:
-
Here, try this, hope it helps.
Good luck.
[code="php"]
<?php
class newClass{
public $hello;
public function __construct(){
$this->hello = "Hello World!";
}
}
$className = 'newClass';
eval("\$cls = new {$className};") ;
var_dump( $cls->hello );
?>[/code]Leave a comment:
No activity results to display
Show More
Leave a comment: