363 Posted Topics

Member Avatar for patrick1984

Hi. You can set the [icode]onchange[/icode] event to trigger a function to calculate the new price. [code=html] <select name="MySelect" onchange="javascript: SetPrice(this);"> <option selected="selected">1</option> <option>2</option> <option>3</option> <option>4</option> </select> <p id="Price">$3.50</p> [/code] Which could look something like this: [code=javascript] function SetPrice(box) { elem = document.getElementById('Price'); newPrice = 3.5 * parseInt(box.value); elem.innerHTML = …

Member Avatar for essential
0
94
Member Avatar for rajeesh_rsn

I would look into something like [URL="http://www.google.com/sitesearch/"]Google's Site Search[/URL]. Much easier than creating a script to search all those static pages.

Member Avatar for rajeesh_rsn
0
121
Member Avatar for gailhands

Hi. The onload event and the AJAX code it executes looks like it's working fine. The problem is that the onload event is not triggered until everything on the page has been loaded and the JavaScript in your "layer18" <div> appears not to be working as it should. In IE …

Member Avatar for Atli
0
180
Member Avatar for iamus

Hi. Are you sure that the path is correct? Personally, I would add files like that in the include path so I wouldn't have to worry about stuff like this. To find the include path, create a new PHP file with this code: [code=php] echo ini_get("include_path"); [/code] That should show …

Member Avatar for Atli
0
89
Member Avatar for tackenco

Not knowing exactly what your other functions do, you could try sending the values along as parameters to the callback function. Something like: [code=javascript] var ajaxObj; function AjaxFunction(par1, par2) { callback = function(){ AjaxCallback(par1, par2); }; ajaxObj = GetXmlHttpObject(callback); ajaxObj.open("GET", "http://example.com"); ajaxObj.send(null); } function AjaxCallback(par1, par2) { if(ajaxObj.readyState == 4) …

Member Avatar for tackenco
0
116
Member Avatar for tonyledenko

Hi. Try changing the name of the submit button. The hidden field and the submit button have the same name, and because the button is later in the markup, it will probably override the hidden field when the form is submitted.

Member Avatar for essential
0
112
Member Avatar for BooBooCat

That's a tall order! It would certainly require much more than just PHP. You would probably have to build a sort of "spider", like search engines use, which would go around scanning every host it can find. Or you could always simply try using [URL="http://php.net/curl"]Curl[/URL] to do a Google search …

Member Avatar for MVied
0
269
Member Avatar for CoolGamer48

Hi. It shouldn't do that, no. You code works like expected on my server. Using the following code: [code=php] $comment = $_POST['comment']; if(get_magic_quotes_gpc()) $comment = stripslashes($comment); echo nl2br(strip_tags(mysql_real_escape_string(htmlentities($comment,ENT_QUOTES)))); [/code] The following string: [ICODE]He said: "What's up?"[/ICODE] Is converted into : [ICODE]He said: &quot;What& #039;up?&quot;[/ICODE] (Added a space in the single-quote …

Member Avatar for Atli
0
162
Member Avatar for StNick

Hi. I'm not sure your view on PHP sockets is accurate. (Although I could be misunderstanding you.) They can of course be used in the manner you described, but I see no reason why they can not be used like you would use sockets in any other language. Take a …

Member Avatar for Atli
0
77
Member Avatar for tonyledenko

There is a lot in that code that doesn't make sense. (Not helped by the lack of [code] tags) First of all, the implode function is being called using a variable ($value) that doesn't exist. (At least nowhere in the code you posted.) And you are handling the check-boxes from …

Member Avatar for Atli
0
126
Member Avatar for lonestar23

Aren't you using the wrong variable in your AJAX URL string? You assign the "search17" element to the "proc17" variable and then use that in your URL. Shouldn't the "search17" variable be in the URL?

Member Avatar for lonestar23
0
554
Member Avatar for silntj101

Hi. The is definitely possible with PHP. Take a look at the [URL="http://php.net/gd"]GD extension[/URL], specifically the [URL="http://php.net/imagecopyresampled"]imagecopyresampled[/URL] function.

Member Avatar for silntj101
0
290
Member Avatar for alienlinux

This can happen if your PHP is configured to ignore short tags, that is if the short_open_tag parameter in your php.ini is set to false, and you are using short tags (<? .. ?>). Make sure all PHP code is inside (<?php ... ?>) tags and not (<? .. ?>).

Member Avatar for alienlinux
0
150

The End.