Jump to content

RichardRotterdam

Members
  • Posts

    1,509
  • Joined

  • Last visited

Everything posted by RichardRotterdam

  1. just to explain what ajax does i'll give a simple description. ajax means you use javascript to call an external serverside(php page prob in your case) to be executed. this happens withoutout leaving the current page your one(refreshing). It is possible to update parts of your DOM html for instance a layer. What you are looking for is probably a script that refreshes a part of your HTML periodically. The data has to be fetched using php
  2. that code is weird man it makes no sence but did you mean this class MyClass{ var $test; function inform($msg) { $this->test = $this->render($msg); } function render() { echo $this->test; } } that would have made sence
  3. I asume you build the part where a costomer has to register and log in too. You just make the user log in on his account then let him/her proceed on the shopping cart. once the user wants to check out you just insert a record into a order table. Things that are unclear are: if you have experience with sql what kind of sql your using if you have the user log on system tell these things and you will get better help
  4. I personally don't seperate the php from html code. That is i dont separate it entirely. I first create a html page with a layout then i deside what parts of that page should be dynamic and that's where i place the php to reduce. The php code even more on my layout page I use php classes. and the use of classes might be the way you want to go. seperating php code completely with file_get_contents and str_replace from html isn't really nessescarry unless your building a CMS which really requires it
  5. that's actually tougher then it seems. you can load all the data in javascript arrays one array for countries the other array for newspapers. try looking for "chained selected javascript" in google you might find something. There is also the ajax way which is not for beginners
  6. oh sorry i only use it for simple html text and not images. You will need a filebrowser plugin for that. The ones on the official tinyMCE page are not free. the link for the commercial plugings http://tinymce.moxiecode.com/plugins.php How ever you might be able to find a free plug in on sourgeforge or somewhere else. Here is a link for plugin and a guide how to get it running that i found simplebrowser
  7. that looks like a lot of trouble just to get a rich text editor working try tinyMCE instead its easier to make it work and it looks better http://tinymce.moxiecode.com/example_full.php?example=true
  8. i dont think you can retrieve text with plain html show some code so the problem can be determined I think you are using javascript so it should be moved to javascript help
  9. i am not gonna try your code on my server instead i'm going to give you some tips to find the error. 1. check if your sb_get.php gives any output if you put it in your browser url directly it should give some html output and also check out the browser source 2. see if something happens with your showData(); js function if you place it on a onclick example <button onclick="showData();">show data function call</button> 3. if the onclick thing worked try putting setInterval("showData()", 1000); on the onload option <body onload="setInterval("showData()", 1000);"> this should be enough to solve your problem
  10. I think ie has trouble with the formed html Try removing the form since ajax doesnt require it and build the html in a better way. And is ajax or that fance button really needed it can be done without any php or is that php file required?
  11. just a suggestion why not render the id's ascending its the value that should matter for you input not the id another way is just to loop through all input elements in your form
  12. this does involve getting the content of iframe in which the iframe is on the same domain right?
  13. what exactly do you want your code to do its a bit vague to me
  14. with or without refreshing the page? if you want this to happen without a refresh you'll need an ajax funtion
  15. Ok so if I am right you want this (not working example) you have a button which calls a function <button onClick="save">a button</button> this calls a function <script> function save(){ var confirmSaveBox=confirm("do you wish to save"); if(confirmSaveBox==true){ //alert('save'); //call php page to update mysql } } </script> now do you want this to happen without refreshing the page? or do you wish to redirect to a page submitting the values with a form
  16. are you using id tags for the fields? you could just do something like this <input id="cn1" name="cn1" type="text" /> <script> //if you're using id attribute for(var i=0;i<6;i++){ document.getElementById("cn"+i).value } ////if you're using name attribute for(var i=0;i<6;i++){ document.getElementByName("cn"+i).value } </script>
  17. javascript is not limited you just have to know what NOT to show and what you can show. You can just d it all server side or.... you use ajax and a session simply do a check on every ajax server script to see if the action id is allow
  18. you only did that half way try the other document.getElementById() too $('testialink').click(function(){$(document.getElementById('testidrop')).slideToggle("slow")}); the red part is just nonsense change the whole code to $('testialink').click(function(){$('testidrop').slideToggle("slow")}); not sure if that works with a click function that way then again i am not familiar with jquery but it looks similar to prototype and mootools
  19. why not just place that function higher? The error just states that your calling a funtion that does not (yet) exist.
  20. that script does look cool but it isn't as hard to reproduce as it seems. 1) it periodical changes the div image and text. 2) it changes the image and text on hover
  21. just use the one that can be found at the link that one at least works and is a lot shorter
  22. if you just want to get the parameters in the url useing javascript there are plenty to find online here is one that works http://ilovethecode.com/Javascript/Javascript-Tutorials-How_To-Easy/Get_Query_String_Using_Javascript.shtml
  23. Hmmm using something great as php and combining it with something evil from microsucks what a sin using mySQL or postgresql is easier and better. You're code seems good have you setup the odbc connection correctly in your Administrative Tools. here is a link http://www.w3schools.com/php/php_db_odbc.asp
  24. I see many similarities with asp.net and cold fusion not sure if it's the same with cold fusion but once your used to that invironment it's all about rapid development which means you can write your program pretty fast. The downside of cold fusion is that it is very expensive to have a coldfusion server running. But if you ask me you should only use cold fusion if you're running a site where flash is used a lot or you use flex. Other then that I don't really see the point of using cold fusion. As for what database you're running it doesn't really matter what serverside language you are using
  25. mootools has a function called periodical. http://docs.mootools.net/Native/Function.js[/ulr] scroll all the way down I think that's exactly what you need.
×
×
  • 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.