Jump to content
xisto Community

who?

Members
  • Content Count

    13
  • Joined

  • Last visited

  1. I'm not sure if I understand your problem, but try using strlen($str), where $str is the textarea value.
  2. As you discovered that recently (not so recently, but I'm adding this info anyway ), multiclassing follows a certain hierarchy. For example, if you define the same property in several classes and you apply those classes to an element, the value of that property to be applied will be the one defined in the last class on the class attribute. In this Practical Example, we will use the "background-color" property defined over three different classes with three different values, and we'll apply those classes to the same element (in this case, a table cell): CSS: .bg_red { background-color: #FF0000;}.bg_green { background-color: #00FF00;}.bg_blue { background-color: #0000FF;}HMTL: <table width="600px" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="150px" class="bg_red"><strong>Red</strong></td> <td width="150px" class="bg_green"><strong>Green</strong></td> <td width="150px" class="bg_blue"><strong>Blue</strong></td> <td width="150px" class="bg_red bg_green bg_blue"><strong>All classes</strong></td> </tr></table>This will produce: Or, if you want to see the whole HTML, download it here.
  3. You don't need to rename the extension. Just right-click the file and Open with Notepad or WordPad (assuming that it is a text-based file).
  4. Then let me know how it goes!
  5. Again, that would require the above mentioned refresh. Personally, I wouldn't use that method, because a frequent user hates to wait for a page loading (which is unnecessary, since it only add html content to a div, what could have been done dinamically, without the refresh). I got it. You like PHP. But PHP is a server language. Stuff that needs to be changed quickly (as the iframe src) need to be done either on a client language (Javascript) or through the target attribute.So... This is just a matter of choice. If you feel you're more familiar with PHP, then do it, although I don't advice you to. My question is... Is your problem solved? Or do you still need help with it? By the way... To use a div with innerHTML... Simply ID the div and through Javascript (and obviously, DOM), set the innerHTML to the things you want (that would need the HTML to be written on Javascript). E.g.:
  6. What about the "one file only" situation? If you want the iframe to appear only if the link is pressed, you can use Javascript and DOM to make an iframe with no width nor height. Eg: Chat Here. Iframe here, but, as width and height are set to 0 it doesn't appear. Link here (when pressed, it will set some width and height and set notepad as the iframe src. Link here (when pressed, it will set some width and height and set smilie as the iframe src. Link here (when pressed, it will set some width and height and set bbcode as the iframe src. You can also give some width and height to the iframe from the beggining, but using css make it invisible (display: none), and when a link is pressed, it will just set the iframe src and set it to be displayed. Do you think any of the solutions is good for your problem? Notice that it would require more than one file, because you're using AN IFRAME!!! If you want to only use one file and if you want the refresh thing to happen... Then use Div instead of an iframe, because if you're using an iframe you'll always need more that one file... That's why I don't understand what's the thing with more that one file. EDIT: "display: none".
  7. I really don't think it would decrease load times (even if it does, I believe it would be irrelevant). So... Why would the extra files clog up your file manager?Now: it depends whether you want a fat or a thin client. If you want a fat client, I would suggest Javascript (I had written a Javascript script for you before I came up with the "target" attribute) to dinamically change a div's inner HTML, instead of using an iframe. This would be a way to only use one file, since the HTML code would be all on the javascript (still don't get why it must be a one-file script; Javascript would also be able to load the html from external files, but that way it would work as an iframe). If you want a thin client, then you should continue to use php, but this will create a fat server, because this will make the server process more information. That would also cause an unnecessary refresh. By the way... I couldn't understand whether you want the iframe to appear ONLY IF the get var isn't any of the three pages or if you want the iframe to appear and have one of the code segments of your page as source. Eg: Situation A: Page 1; Or page 2; Or page 3; Or Iframe. Situation B: Code that will be used to generate a page for the iframe, meaning that it will be generated if the get var is defined as being one of the three pages; Chatbox. Iframe with src="samePageWhereItIsLocated.php?toolbar="oneOfThreePages""
  8. There's a much simpler way... Using the "target" attribute on your links. Example: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://forums.xisto.com/no_longer_exists/ xmlns="http://forums.xisto.com/no_longer_exists/ Title Here</title></head><body><a href="bbcode.htm" target="toolbar">BBCode</a><a href="notepad.htm"target="toolbar">Notepad</a><a href="smilie.htm" target="toolbar">Smilie</a><iframe name="toolbar" src="firstVisitIframeSource.htm"></iframe></body></html> ADDING: By the way... Obviously, no PHP coding is needed in the example...
  9. FIXED (BUT NOT FIXED)!!! Hi.No, I did named the input correctly, and I'm submitting it via post. (I would have noticed it, since I'm reviewing the code over and over!!! But thanks for your reply! You'll find the solution pretty stupid (or you'll think I'm a noob, because it maybe obvious to you and not to me)). And the link is: http://forums.xisto.com/no_longer_exists/ (I forgot to mention it, sorry! But the code was the displayed one, except for the vars names, that are portuguese; nothing relevant...) THE SOLUTION HAS BEEN FOUND: Thank you for all your replies... After much testing pages and stuff... And after writing many lines of code... I found the solution... by accident! I use Dreamweaver to program my websites... Since (I think) CS3, Dreamweaver doesn't write entities on the code, because it uses UTF-8, which doesn't need entities, because it shows them correctly... I used to use Notepad to write small amounts of code... But since it was a big site... I used, once again, Dreamweaver... One of the test pages I did, I wrote it on Notepad... And it worked! I didn't know why at that time... I mean... I wrote a different code... A simpler code... So I compared them over and over again... Nothing was different (except for the name of the cookie and for the value var)... When I saved the same code with Dreamweaver... It didn't work! So... after much thinking... I realized it had to do with the UTF-8/ANSI (predifined in Notepad) situation... Conclusion: It works when I resave the code in Notepad (using ANSI)... But I have to manually replace the entities... Why doesn't the code work in UTF-8? (By the way, the thing that doesn't work is the setcookie() function, because everything else in the PHP works, otherwise the $style var would come out blank, showing a stylesheet-less page.) Am I a really big noob? Or is this just stupid??? By the way, thank you very much for your replies! EDIT: After googling it... Got to a page that I've, during this problem, dozens of times (to verify everything was fine with my coding...): http://php.net/manual/en/function.setcookie.php. Somehow I didn't read that note, that says the same thing I concluded, so... For everyone that maybe reading this post in hope to find the answer to your setcookie() problem, here it is...
  10. I really don't understand what's wrong... Currently I'm using Javascript to do the job while I don't fix the PHP problem but I'm still looking for a solution. Thanks for your reply! EDIT: "I already did two test pages: cookie1 and cookie2. Cookie1 was the cookie set script and Cookie2 was the reader. Nothing." => Forget this sentence... I just did the cookie1 and cookie2 thing again... It worked!!! So... I'm gonna analyze my if condition and what I've done wrong... It's weird the test didn't work the other time. It echoes nothing, so... Something's wrong. I'll see what I can find.
  11. Hi. I'm doing a website that basically checks if it has chosen a css style before. If it has, it shows the last shown style, and if it doesn't, it shows "natura" style. On the page there's a form that lets the user choose the style. It is based on cookies. The thing is that when I do java script:alert(document.cookie) on the address bar it gives me a blank alert! And, obviously, when I reload the page, the style doesn't change!!! The thing is I'm sure it has nothing to do with the HTML code, and I also thing it does have nothing to do with the php code neither, because the whole script works on localhost. Here is the php code: <?php$arrColorAds = array("plain"=>"6699CC", "natura"=>"FFFFFF");if(isset($_POST['style'])) { $style = $_POST['style']; $colorAds = $arrColorAds[$style]; setcookie("style", $style, time()+2678400);} elseif(isset($_COOKIE['style'])) { $style = $_COOKIE['style']; $colorAds = $arrColorAds[$style]; setcookie("style", $style, time()+2678400);} else { $style = "natura"; $colorAds = $arrColorAds[$style]; setcookie("style", $style, time()+2678400);};?>HTML code... Please help me! This is for a school project, so I need to do this so I can focus on the real work! P.S.: Off-topic: Does Xisto supports non-english sites? It used to not support them, that's why I'm asking. And sorry for my English!!!
  12. Hi. I do this for a long time, just like you (I think) and I loved your tutorial. It's very complete and it teaches how to do panoramas in a simple way. Congratulations. I just wanted to say that I'll add another part of it. There are programs that transform your panoramas into VR (virtual reality). There are several formats, like Java, Flash and QTVR (Quick Time Virtual Reality). The last one is the most used. I'll do a tutorial teaching this (with your permission of course). Again, great tutorial!
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.