Jump to content

ceruleansin

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

About ceruleansin

  • Birthday 07/07/1977

Contact Methods

  • Website URL
    http://ceruleansin.byethost3.com/

Profile Information

  • Gender
    Not Telling

ceruleansin's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Process? Unless that is a play on words, yes. I may not be the brightest crayon in the box, but its a big freaking box, so I'm ok with that.
  2. Jay, Just one more thing. I see people using CPAINT2 as a framework for using AJAX. If you know anything about it, can you tell me how I would go about using it to request a file from the server? I tried using my own AJAX script below: function loadXMLDoc() { if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("overlay_info_contents").innerHTML=xmlhttp.responseText; alert("yes this is active!"); } } xmlhttp.open("GET","http://ceruleansin.byethost3.com/gallery/libraries/ajax_info.txt",true); xmlhttp.send(); } I think it didn't work because CPAINT is already in use and there might be a conflict in the xmlhttp.onreadystatechange. Thanks!
  3. Awesome! I should have guessed that there was a way to do this. Thanks very much. BTW, I checked out your site and I love the contents. It might just be me, however I would love to see a compressed version of the page with just the headers. I hated having to scroll down the huge page to see what other cool topics you had about PHP. Thanks again!!
  4. Ok. That seems logical. I hadn't played with AJAX yet but I looked up some basics. I have a few Q's though about the process. Is this correct? 1) Server side scripts are run 2) Client data is sent 3) Web App (Firefox ect) displays client data and runs client side scripts. 4) User generates query and AJAX requests data. 5) Changed data is displayed. So, if I were creating a gallery and the user clicked on a thumbnail, then I could request any data from the server that I wanted via AJAX correct?
  5. I would love to find an elegant way to do the following sequence. I'm so new to PHP that its easier to ask because I don't know what to look for. Lets say I have the following files. index.php my_javascript.js The index file calls my Javascript in the normal fashion with the following code. <script src="my_javascript.js" type="text/javascript"></script> In my JS file there is a section which dynamically adds content to a <div> that is in the index.php file. I must use the JS file to add the content. HERE IS MY PROBLEM. How do I dynamically replace the content in the JS file BEFORE it gets sent to the user? EXAMPLE of index.php: <html> <head> <script src="my_javascript.js" type="text/javascript"></script> </head> <body> <div id="my_id"> This is static text that will be dynamically changed by Javascript. </div> </body> </html> EXAMPLE of my_javascript.js: replace_contents += 'This is the dynamic content of the div to be changed.'; So, I need to replace the line "This is the dynamic content of the div to be changed." with something from a php array before it gets sent to the user. Thanks for your help.
  6. I've been working on modifying a PHP gallery kit that can be found here. http://minishowcase.net/ Here is my implementation of it so far. http://ceruleansin.byethost3.com/gallery/ The file primarily responsible for displaying the enlarged image on the screen once you've clicked the thumbnail is /libraries/ajax.functions.js In this file I've added a few lines of script. This was so that I could get a nice mouse-over effect displaying some data when I mouse over the image. The purpose was to include basic info for each image like Title, Description, Dimensions, Price and Availability. Here is the code that I've added in HTML / Javascript, and yes I know this is a PHP forum, I'm getting there lol. imgout += '<a href="#" class="rollover_pointer" onmouseover="document.getElementById(\'overlay\').style.visibility = \'visible\';" onmouseout="document.getElementById(\'overlay\').style.visibility = \'hidden\';"><div id="overlay" style="position: relative; top:'+(fh-64)+'px; height: 100px;" class="overlay_info"><div class="overlay_info_contents">Title:<br>Size:<br>Medium:<br>Price:</div></div></a>'; The "imgout" variable is added to the source contents of a <div> when the image is called from the gallery. HERE IS MY PROBLEM. (About time, I know!) I need to dynamically add the contents (ie. Title, Description, Dimensions, Price and Availability). There are several ways of getting the data I know of, including reading it from a text file or populating an array from a static PHP page that contains the list. Either way, I need my script to function like the following. imgout += '<a href="#" class="rollover_pointer" onmouseover="document.getElementById(\'overlay\').style.visibility = \'visible\';" onmouseout="document.getElementById(\'overlay\').style.visibility = \'hidden\';"><div id="overlay" style="position: relative; top:'+(fh-64)+'px; height: 100px;" class="overlay_info"><div class="overlay_info_contents"><?php echo $image_array[0] ?></div></div></a>'; To summarize, is there a way to dynamically add info from a PHP array to a *.js file BEFORE its sent to the user? Thanks for all you help!! Yay PHPFreaks! PS. I've included a stripped version of my gallery in RAR. Just code, no images. [attachment deleted by admin]
  7. Hey there fellow freaks! Thanks for putting yourselves at my disposal. I shall now commence the knowledge sucking.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.