743 Posted Topics

Member Avatar for Inny

[QUOTE=hunkychop;560289]using ajax to call a php fuction: [INDENT]put this where you want resutls: [CODE=html]<div id="results" style="display:inline; width:100px; height:20px;"></div>[/CODE] include this ajax library in the page you want the results to display on. [INDENT][url]http://www.codeproject.com/KB/ajax/SAL/sal_src.zip[/url][/INDENT] [CODE=html]<script type="javascript" src="path_to_ajax_lib"></script>[/CODE] create php page with your function in it and do this: [CODE=php] <?php function …

Member Avatar for digital-ether
0
494
Member Avatar for HenryForbes

[QUOTE=HenryForbes;549597]Help, I have a web based form containg values typed in by the user. The first value is called noItems, which is outside the form. The form contains a persons name, the number of items,noSub, thay have submitted and their final grade. I need to use noItems and noSub to …

Member Avatar for digital-ether
0
78
Member Avatar for adrumsolo4u

[QUOTE=adrumsolo4u;549815]what i am trying to accomplish is to have two elements lets say SEND and RECEIVE. when i click the element SEND i want the RECEIVE element to receive the effect. currently my script only effects the element itself: [CODE=javascript]var animElements = document.getElementById("send").getElementsByTagName("p"); for(var i=0; i<animElements.length; i++) { animElements[i].onclick = …

Member Avatar for digital-ether
0
89
Member Avatar for austind

[QUOTE=austind;548555]I've been working on re-designing my website, and I decided to add a javascript based slideshow to go on the front page to link to articles. I know next to nothing about scripting (XHTML/CSS is my thing). The question I have has to do with the slideshow loading incorrectly because …

Member Avatar for digital-ether
0
89
Member Avatar for CathInfo

I just tried this test: [CODE]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> <script> window.onload = function() { var s = document.getElementById('field[12]'); var cust_cc_exp_month = s.options[s.selectedIndex].value; // This displays the correct Value -- which is "0" for item #0 = …

Member Avatar for digital-ether
0
91
Member Avatar for kishou

[QUOTE=kishou;549456]ok i have a iframe and i want it so that when someone clicks a link inside it it opens in the same window. not a new window. i was thinkingof using onclick but it would be too much work.[/QUOTE] Links in an IFRAME should open inside the IFRAME by …

Member Avatar for digital-ether
0
62
Member Avatar for pink_zippy_123

[QUOTE=pink_zippy_123;348150]Hi, Basically I am quite new to php but am currently connecting to a database and am trying to send data from one web page to another using the information selected in a hyperlink. The first web page contains a table populated will all options within the database e.g. if …

Member Avatar for digital-ether
0
1K
Member Avatar for Boat_2005

Is the problem how to get let .htaccess know that the user is authorized and set this in php? I've never used .htaccess for authentication before so I wouldnt know but I can suggest that you remove .htaccess altogether, and use just php if you are deperate. You can still …

Member Avatar for midget
0
3K
Member Avatar for islandbreeze

[QUOTE=islandbreeze;521994]Hi, A simple problem for you I hope. I have applied a pre-made javascript to a dreamwever template. It works fine when I preview the template in the browser. When I apply the template to other pages it will not work - the container box shows but it cannot show …

Member Avatar for islandbreeze
0
195
Member Avatar for rrocket

You can have JavaScript save cookies. This is done immediately, so page reloads are not needed. Example JS: [CODE]/** * Set a cookie * @param string cookie name * @param string cookie value * @param string cookie expiration counter in days * @param string cookie path * @param string cookie …

Member Avatar for digital-ether
0
150
Member Avatar for hmullie

[QUOTE=hmullie;521575]Hi all i have started a website however i have a problem with the chat script does anyone have knowledge about dolphin scripts. my users seems to be offline even though they are there. just been suddenly disconnected in the chatroom and then the site shows they are offline. the …

Member Avatar for hmullie
0
125
Member Avatar for sree22_happy

Can't see why your codes doesn't invoke xmlHttp=new XMLHttpRequest(); bit odd. [CODE] var xmlHttp; function getXmlHttp() { try { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { try { xmlHttp=new XMLHttpRequest(); } catch (e) { try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { alert("Please use a new browser!"); return false; } } …

Member Avatar for sree22_happy
0
218
Member Avatar for Lee-Pro

[QUOTE=Lee-Pro;515513]Hey everyone, this is a very tough problem I am facing right now in JavaScript. I'm designing this script to load a page like an IFrame but is using AJAX, the only problem is that I need to edit certain attributes before displaying them through changing an element's innerHTML attribute. …

Member Avatar for Lee-Pro
0
127
Member Avatar for OmniX

Attach an event to the onchange property that will check the whole value of the input, not just the key pressed. It would be slow, and decrease usability a lot. I'd recommend something along the lines of what MidiMagic said. Like attaching an event to onblur or the form submission …

Member Avatar for ~s.o.s~
0
1K
Member Avatar for shreevidya

[QUOTE=shreevidya;515337]i am doing a project where i require some message from php file to be transfer to c.is it possible to do. if so can u specify certain links for looking and studing too area[/QUOTE] Not sure if PHP has an API for this. You could run a command on …

Member Avatar for digital-ether
0
96
Member Avatar for smilyswapna10

[QUOTE=smilyswapna10;512161]hi, i did uploading a file with using <input type=file> but is it possible to upload file without using<input type=file> i am using PHP as server side language Thanks, swap.[/QUOTE] Not unless the browser has allowed local file access via a "decreased" security setting.

Member Avatar for digital-ether
0
59
Member Avatar for mariecon

i know mootools has a method that will serialize the form into a query string. I'm sure other popular JS libraries will have one too.

Member Avatar for mariecon
0
100
Member Avatar for ineuw

[QUOTE=ineuw;504699]I built a web page form, where the action is set to "mailto" to my email address. I already scripted the client side using Javascript and I wish to know if I can use Javascript for server side scripting as well? I do not know PHP, nor Perl, and prefer …

Member Avatar for ~s.o.s~
0
112
Member Avatar for Pro2000

Attach DOM nodes to your Document instead of replacing innerHTML. Any text selection will disappear when you remove text, then replace it with new text. When attaching DOM nodes, only the added HTML Node is injected into your HTML, and the text selection will remain. It will also not flicker …

Member Avatar for digital-ether
0
102
Member Avatar for OmniX

I don't think you can use is_int() since all HTTP data is considered strings. There is no type distinction in HTML FORMS or HTTP GET/POST responses. You could check for range: [CODE] if ($var > 0 && $var < 100) { }[/CODE] Or you can use something like: [CODE]if (intval($var) …

Member Avatar for OmniX
0
174
Member Avatar for zeromancer

[QUOTE=dRoot84;506762]Hi guys, I know this thread was years ago, but I think many many people are looking for a solution for this problem but not finding anything. Scrolling a scrollable DIV tag is pretty easy by using the fabulous prototypejs framework by [url]www.prototypejs.org[/url]. Lets see what we've got here... some …

Member Avatar for digital-ether
0
1K
Member Avatar for Spaiz

Congratulations. You have a very nice CMS. It works fine for me, tested on PHP 5.1.6 (cli). No problems at all. PHP info: [QUOTE] PHP Version => 5.1.6 System => Linux server.fijiwebdesign.com 2.6.18-sept26el5 #7 SMP Thu Jan 10 16:02:00 EST 2002 i686 Build Date => Oct 26 2007 13:46:09 Configure …

Member Avatar for Spaiz
1
9K
Member Avatar for chitra1

[QUOTE=chitra1;504478]Hi everyone! I'm working on a project whereby the system is rule-based. I have to write the rules in either Common Lisp but the problem is that i'm using PHP for designing the interface and I'm not able to link these two languages. Could anyone plz help me??????[/QUOTE] What type …

Member Avatar for digital-ether
0
105
Member Avatar for halifaxer

[QUOTE=halifaxer;505210]Hi there, Bit of a complicated query, for me anyway. lol Following code: [code]$url = 'http://www.cheapsmells.com/viewProduct.php?id=6590'; $html = file_get_contents($url); preg_match('/<div class='productOurPrice'?>(.+?)(\d+\.\d+)(.+?)?<\/div>/', $html, $match); $out = $match[2];[/code] Great, no problem! However, this next url I need to code to is a bit trickier as the tag data is, well see below... …

Member Avatar for phper
0
142
Member Avatar for saranya_arun

[QUOTE=saranya_arun;504518]I have 4 radio buttons and 4 text boxes, say for eg: r1, r2, r3 and r4 and t1, t2, t3 and t4 respectively. On load of the page all 4 text boxes will be disabled, when i click on r1, t1 must get enabled. When i click on r2, …

Member Avatar for ~s.o.s~
0
266
Member Avatar for tie372

[QUOTE=tie372;504778]Thanks it worked perfect.[/QUOTE] Since you're obviously selecting all genres, you don't need to SELECT the genres first. You just have to order your results by the genre, and then by the name. Just use: [CODE] $sql=mysql_query("SELECT * FROM bands ORDER BY genre, name");[/CODE] If there are some bands that …

Member Avatar for digital-ether
0
70
Member Avatar for Charleslp2007

I'm not familiar with the way Hotornot or Hi5 do it. Do you receive actual emails in your mailbox, or is it just notifications of Private messages from other users? The easy way, is to have a private messaging system, and then notify users via email of new messages, and …

Member Avatar for digital-ether
0
296
Member Avatar for tefflox

[B]Try:[/B] [url]http://www.php.net/curl[/url] - PHP curl Lib docs [url]http://curl.haxx.se/libcurl/php/[/url] - Curl Lib Author's site The nice lil class contributed by Sean Huber to the PHP docs should work quite well for simple HTTP tasks... [php] <?php /* Sean Huber CURL library This library is a basic implementation of CURL capabilities. It …

Member Avatar for tefflox
0
132
Member Avatar for redZERO

[QUOTE=redZERO;495525]Hi, I would like to know a resource or simple solution for this, I have a mySQL database with lots of links. I need said solution to visit each link and download the HTML file for it. Like an indexer which is told where to index.[/QUOTE] If you have CURL …

Member Avatar for digital-ether
0
127
Member Avatar for tefflox

[QUOTE=tefflox;499412]I get that, but I don't want any redundancy in the links. Your suggestion might offer the same page twice or more times in a row.[/QUOTE] You'll need to keep track of the visited links via the client session. You can add it directly to PHP's built in session, or …

Member Avatar for nav33n
0
105
Member Avatar for angwy83

[QUOTE=ShawnCplus;499324][code=php]$purl = $resultat->product_thumb_image; echo "<img src='test/image/products/".$purl.".jpg'/>";[/code] Firstly you don't need disambiguation parenthesis when there's no ambiguity. Secondly look at the source of the page that is displayed on and see what is actually output. If it just says [inlinecode]<img src='test/image/products/.jpg'/>[/inlinecode] then [inlinecode]$purl[/inlinecode] isn't being set.[/QUOTE] Either your $purl var is …

Member Avatar for vssp
0
102
Member Avatar for dheeraj5689

[QUOTE=dheeraj5689;497322]Hi Everyone, I just want to know that can I implement a Facebook api on my server? It means all the facebook feature should be display in my server. Please anyone have any knowledge about this featured had provided by facebook then please guide me. Thanks Dheeraj[/QUOTE] In general, to …

Member Avatar for dheeraj5689
0
187
Member Avatar for ep2002

You can do a search on sourceforge.net under the trove category programming->php. You should find what you are looking for. I believe e-groupware should do the job: [url]http://www.egroupware.org/[/url] The other options are php-collab and dotproject. I havent looked at them for a while but they should have grown from when …

Member Avatar for csc111vs
0
185
Member Avatar for Dani

[QUOTE=cscgal;195561]Is it possible to make an entire [INLINECODE]<div>[/INLINECODE] into a hyperlink using CSS only, as can be easily accomplished with mouse events in JavaScript? I'm assuming it's too good to be true since CSS isn't interactive? Nevermind ... I guess I just answered my own question :([/QUOTE] Nope, unfortunately you're …

Member Avatar for tracedef
0
582
Member Avatar for jay64

[QUOTE=jay64;482040]I don't really know how to explain this easily. I guess I will layout the project I am trying to do, and the problem I am having with it, and maybe someone could explain it better to me. I am trying to build an online food journal for a fitness/nutrition …

Member Avatar for jay64
0
151
Member Avatar for Inny

If you use a <script> tag then you will get the URL/page where the <script> tag is in as the referer. example: if index.php has: <script src="spy.php"> Then you'll always get index.php as the referer. This is because the user was on index.php when the HTTP request for spy.php was …

Member Avatar for Inny
0
310
Member Avatar for adrive

[QUOTE=adrive;479780]hi, im not entirely fluent in the http headers, but i just did a test, with an ajax page that calls php to save something. I then tried throwing an exception from php, but ajax's status is still 200. So does this mean i have to return other http status …

Member Avatar for adrive
0
141
Member Avatar for Taffd

[QUOTE=Taffd;479700]Is it possible to include the character < in a regular expression? I don't seem to be able to find a reference to it anywhere and am unable to build a regex with just this one character.[/QUOTE] Yes, there is nothing special about the < character. eg: [CODE]preg_match("/</", "<div>some text</div>", …

Member Avatar for digital-ether
0
143
Member Avatar for JaxsWastedLife

Since you cant change the existing html pages, every time a user clicks on a link in your template, it links to the html page directly, and not through your template. Avoiding this cannot be one with a server side scripting language anyways. It depends on the server you are …

Member Avatar for xeto
0
175
Member Avatar for fernandodonster

[QUOTE=fernandodonster;448428]I would like to take back of my database of postgress. now i am doing the command "pg_dumb " which written in a shell script and run it on command promt How it will do with PHP? Can i use that shell script in the PHP? Is there any need …

Member Avatar for fernandodonster
0
176
Member Avatar for Inny

[QUOTE=Inny;448373]can somebody please show me how to make images clickable thumbnails of uniform size for an image marquee?[/QUOTE] You can use a server side language to resize the images to a defined thumbnail size. I work with PHP mostly and this is done easily with the GD2 Library, or Imagemagik. …

Member Avatar for digital-ether
0
80
Member Avatar for Lucrezia

[QUOTE=Lucrezia;423465]Hello all! I am using some javascript code to change some classes of an external stylesheet on the fly. Is there any way (a variable perhaps?) to access the changed stylesheet so that I store it afterwards with php, or should I rebuild it again (according to the options of …

Member Avatar for MidiMagic
0
140
Member Avatar for rpjanaka

Hi, Could you post some of your code? The error message is quite detailed.. have you checked those suggestions?

Member Avatar for digital-ether
0
336
Member Avatar for ndeniche

[QUOTE=Nichito;422865]here are all my codes: [B]dbconnect.php [/B][code=php]<?php mysql_connect("localhost","nobody","ydobon") or die("<h3>could not connect to MySQL</h3>\n"); mysql_select_db("guestbook") or die("<h3>could not select database 'guestbook'</h3>\n"); ?>[/code] [B]sign.php [/B][code=php]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> <META NAME="Generator" CONTENT="EditPlus"> <META NAME="Author" CONTENT=""> <META NAME="Keywords" CONTENT=""> <META NAME="Description" CONTENT=""> </HEAD> <BODY> …

Member Avatar for w_3rabi
0
460
Member Avatar for JimN

Hi, Here is an example of how to pass a parameter to a javascript function. [code] function myfunction(param1) { alert(param1); } myfunction('hello'); myfunction('bye'); [/code] If you run that piece of JS, you'll get an alert window with the string "hello", then another alert window with "bye". However both alert windows …

Member Avatar for JimN
0
598
Member Avatar for david555

[QUOTE=david555;423305]hi, my purpose of my code is to get an array of subcategory details and format it and when when mouse over some subcategory - an image will change (dynamically). this code is PHP with Javascript My problem is how can i get the variable 'key1' from the javascript funtion …

Member Avatar for digital-ether
0
273
Member Avatar for abraham.obando

peculiar... is there some code you could post? Are you using persistent sockets? Whats the protocol used to talk to the remote server? could also be an issue was with the remote server.

Member Avatar for abraham.obando
0
83
Member Avatar for binoj_daniel

[QUOTE=binoj_daniel;418514]How can setup an automated mailing of datadriven content on some schedule? How can i implement using PHP? Is there any configuration on the Web Control Panel? Any ideas?[/QUOTE] What web control panel are you using? Many of the web control panels used by hosting companies will allow you to …

Member Avatar for binoj_daniel
0
82
Member Avatar for tshivaraj

[QUOTE=tshivaraj;416669]Hi All, Is there a way to terminate an AJAX thread. I have an application where if a user selects multiple options in a rapid succession it causes a deadlock situation. I would like to terminate the previous thread, if a new one is spawned. I am using prototype. Thanks, …

Member Avatar for digital-ether
0
140
Member Avatar for newsteve

Not sure how the code is going but I don't see [B]startStop[/B] being instantiated. If you have something like: [CODE]startStop = setTimeout(function() {}, 1000);[/CODE] Then you can stop it using: [CODE] clearTimeout(startStop);[/CODE] or clearInterval() I believe for setInterval().

Member Avatar for digital-ether
0
154

The End.