RichardRotterdam
Members-
Posts
1,509 -
Joined
-
Last visited
Everything posted by RichardRotterdam
-
The double dollar is a variable variable. variables.variable Personally I don't really see the point of using them I rather use arrays. But you could use them.
-
Don't mean to be rude but It will increase the readability of your code on this forum. What is the error you receive in FF?
-
What do you mean with taken the errors out? Did you turn off error reporting or did you fix the errors you received? Here you say you get an error but you don't know the error. How do you know it's an error to begin with then? Do you concider a blank screen as an error
-
Inserting a script using innerHTML property
RichardRotterdam replied to dpacmittal's topic in Javascript Help
Do you perhaps have this page online? It's practically impossible to help you without seeing what this adsense code looks like. That or paste some sample code like Nightslyr already suggested. -
Well I still recommend you to at least reconcider rewritting it without frames. But I guess you could use php to do something like that. look into $_GET
-
Those pages could just as wel have been plain html pages. So instead of it showing ?page=gallery as url it might as wel show /gallery.html Other then that I can't see any reason in that example that justifies the use of the iframe. The usage of a template would have been better. What is reason you want to use an iframe btw?
-
[SOLVED] generate unique number plus texts for each record
RichardRotterdam replied to jkkenzie's topic in PHP Coding Help
What about using hexdecimal numbers and increasing each record hexnumber by one? Then you don't have to check if the number doesn't already exists. The reason for using letters as wel as numbers as id's is usually to shorten the length of the number of characters and not to just make it look cool. -
If it's gonna be jQuery the manual has a nice description and examples jQuery clone And a previous topic using the jQuery clone function http://www.phpfreaks.com/forums/index.php/topic,254753.0.html
-
Inserting a script using innerHTML property
RichardRotterdam replied to dpacmittal's topic in Javascript Help
It works for me. The script gets injected into the div element just fine. However it wont alert hey. That's because of the way the browser works. It processes all the html/javascript/css it's given once and there it stops (unless there is some javascript function that gets executed periodically but that's not a solution for you). It doesn't reprocess all the new html elements it's given. Why would you want that anyway? It doesn't seem to server any purpose. -
[SOLVED] Quick help on PHP Checkboxes!
RichardRotterdam replied to Gayner's topic in PHP Coding Help
Uhm what -
[SOLVED] Sending multiple varialbes in a form via AJAX
RichardRotterdam replied to theflea912's topic in Javascript Help
Hehe That's not what I meant with "add an event to the submit button" Let me try to explain again <script type="text/javascript"> window.onload = function(){ // fetch the submit button element by id submitButton = document.getElementById('submit'); // add an event to the submit button submitButton.onclick = function(){ var hour = GET THE VALUE OF THE HOUR HERE var min = GET THE VALUE OF SEC HERE var msec = GET THE VALUE OF MSEC HERE var distance = GET THE VALUE OH DISTANCE HERE // call your pace function pace(hour,min,sec,msec,distance); } } </script> Just get values where the letters are in caps -
[SOLVED] Sending multiple varialbes in a form via AJAX
RichardRotterdam replied to theflea912's topic in Javascript Help
You need to fetch the values with javascript. There is plenty of tutorials how to do that online. http://www.google.com/search?hl=en&rlz=1G1GGLQ_ENNL282&q=javascript+form+values&aq=f&oq=&aqi=g8 -
What frameworks does the majority of phpfreaks use?
RichardRotterdam replied to littlevisuals's topic in Frameworks
ZF in combination with Doctrine for me and still learning. I tried some cakePHP but I prefer ZF. -
Without reading through all that code which doesn't seem necessary at all. I see you meantion jQuery and in the script I see prototype and scriptaculous mentioned. Could it be that these just conflict? If so I suggest you just stick with either prototype.js or jQuery. If you absolutely have to use both (can't imagine why). Then take a look at jquery's noconflict mode.
-
[SOLVED] Sending multiple varialbes in a form via AJAX
RichardRotterdam replied to theflea912's topic in Javascript Help
The logic behind it is that you dont wan't to submit the values. You might think to yourself "Huh say what I want to submit the values darnit?" But yes the form shouldn't be submitted. Submitting the form will result in sending the values to the same page and making the page reload or go to a different page depending if the action has a different page name set. What you need to do is fetch the values and send it using ajax (or the xmlhttp object to be more precise). First change your form tag like so <form id="240" onsubmit="return false;"> this will prevent your form to submit since we dont want a reload. now add an id to your submit button <input type="submit" value="Calculate" id="submit" /> now let's add some unobtrusive javascript. place the following javascript in your <head> section <script type="text/javascript"> window.onload = function(){ // fetch the submit button element by id submitButton = document.getElementById('submit'); // add an event to the submit button submitButton.onclick = function(){ // add your pace function call here } } </script> just change the code where it says add your pace function call here and there you have it. hope it helps -
If you use eval you might be able to encapsulate a method inside the json object. However I do advice you not to do that. Json is meant to be used as data carrier just like XML and not to pass methods. I'm sure you can use different approach to reach your goal. Could you describe how your navigation should work in more detail?
-
If you are trying to abuse some kind of "pay per click" campaign simply don't do it. Indeed it will get you excluded from some programs. Other then that popups with adds that open up automatically suck a#$ big time!
-
There are a number of ways you can do that. You can use sessions, cookies, send parameters along with the url and a couple more ways. Just look into those subjects and see which one will suit your needs the best.
-
Can you show the rest of the javascript code. It looks like you are using mootools for this one. I do notice that the curly brackets {} shoud be behind the parentheses ( ) change: window.addEvent('domready',function({})); to: window.addEvent('domready',function(){ // your domready code here });
-
With this you probably mean that in the Dreamweaver design mode it shows the php icons. Is this correct? If so that just means there is php there. the following code is just crap and I guess i finaly get to use a new icon oh smashing!! <?php require_once['config.php'];?> require_once is a function not an array. arrays use square brackets functions use Parentheses ( )
-
Amazon Product Feeds Scrapper!
RichardRotterdam replied to natasha_thomas's topic in PHP Coding Help
Well if you're new to the affiliate marketing thing I guess it can be a bit of a jungle to find your way around. affiliates4u.com is such a community for affiliates. This topic might help: http://www.affiliates4u.com/forums/affiliate-marketing-lounge/39608-amazon-product-feed.html -
At first you're probably gonna be way slower writing a program since you're learning how to work with the framework but once you have gotten the hang of it things will take a lot less time. The benefit of working with these frameworks (as already mentioned) is the separation of the logic, data and view. It makes the code more readable and easier to maintain especially for others that might jump in a project later on. This is going way off topic but anyway..... Moving your existing project to an MVC framework depends on how big the project is. If it's a big project then you're better off starting from scratch and rewrite it all. It is pretty much the same as trying to convert a procedural written program to an OOP design. If it wasn't designed from ground up to be OO then converting it all might do more harm to the project then improvement. Learning how to write a basic CRUD app is prob one of the ways to learn how ZF works. Look into tutorials for that. Starting with Zend Framework as first MVC framework well.... for me personally it has a pretty steep learning curve and I am still learning how to work with it and giving me a migraine at times. I started with Jango (python) as MVC framework and it was pretty clear how MVC worked. I was particularity impressed about the ORM (even though I didn't know what it was ORM at that time). I hear from others as well as my own experience is that its easier to pick learn how to work with cakePHP. Because I have learned how to work with these "lighter" MVC frameworks it was easier to learn how to work with ZF. Maybe it could work for you too.