Jump to content

Jack McKalling

Members
  • Posts

    1,606
  • Joined

  • Last visited

Everything posted by Jack McKalling

  1. Jack McKalling

    comment boxs

    Another (common forgotten) posiblility is to write the data into a file, as for PHP done with fopen(), fwrite() and fclose()
  2. It can be done with either JavaScript or PHP. I've done both, and both work nicely.It can't be done without JavaScript or any other language, while this action forces manipulation of the page. (X)html can't do that.The way you can do this, for JavaScript, is (only I guess,) via the URL.Then match the word specific for your next stylesheet from the location, if present, write another <link /> element.The stylesheet links should ALL be written by JavaScript, including the default. So if it finds a variable in the location, it will compare it to all available stylesheets, and their words. eg. if "fooB" is found in the location after "?stylesheet=", it will write the element <link href="fooB.css" ... /> If not present at all or "fooA" is found, it will write <link href="fooA.css" ... />If this is not clear to you, I'll get my ready script for you.For PHP, it can be easilier be done with POST rather than GET (the above way for JavaScript is called via GET). If you want to have a button or anchor to another stylesheet, just let it be the submit action for a certain (hidden) form. Then it can post the stylesheet preference. The next page should search for the post variable to be present, and in PHP, echo the correct stylesheet. So every page that will get the ability to show another stylesheet, gets the script that searches for the post variable, and every page that will get the ability to choose another stylesheet , gets the posting form. Both abilities can be assigned for one page.I can give you my sollution, if you want or are not able to write the scripts by your own.
  3. In here, like on Invision Power Board? Or just a custom site?Here it would be very difficult, for the admins to enable us members to send (personal?) messages to a certain IP address.As of first to do, all the IPs have to become available, which is not recommended...The admins can already see the IP addresses, but members are logically not allowed. On InvisionFree it is easy to shut down the hiding of IPs for members, but I don't know the situation of IPB. You may contact the admin here.
  4. Yeah, I can dream that one that is where I learned how to create and show it.But I want to understand the possibilities too, they aren't explained :)1) Make a loop, inwhich the showing of the popup increments. then the popup will slide to your position.2) Add the event object, and let the popup show at the source element where you activated it (right beneath a button for instance)3) Make a button inside the popup, that if clicked, hides the popup.Great things, but some things are difficult to guess how to do. (Actually, these three things I already made, from scratch, working as expected)
  5. Thank you :)It is exactly what I needed, it said how to turn an external JavaScript file into a PHP file, which is forced directly downloaded from the server instead of first the cache :)Great help, you may do that more often
  6. Give us a screen, we still don't get what you mean.
  7. You're right. I am not going to suggest to build a database , but it would be very helpful in your case :(Instead, you could write a php program then to easily add a link to a flat file. I had a very similar case by my self, using hundreds of movie urls. I just added a PHP script and it got my dream combo
  8. Maybe you mean some the space between lines? It might means that you double-entered or entered a new paragraph, which inserts a white line before the new line...But I may not have understand you right
  9. The JavaScript tutorial recently got updated with several new looping alternatives, go have a look for "for...as", "try...catch", "throw" etcetera.
  10. I know why it still come up.You have windows ServicePack 2, which has settings of a Popup-blocker, document certificates and plugins. They can be retreived from the statusbar, if settings are default. So when you don't shut them all down per each user browser, the user gets a forced statusbar at the window, even if your request said 'no' (or '0').I guess it is not possible to hide the statusbar after the comeout of ServicePack2, so don't bother trying :)If you still want to, you may look for the topic inwhich we discuss how we can hide the target url of an <a> element -> here
  11. I want to redirect to a page that contains an external file, and which must be refreshed before loaded :)META-REFRESH can, but how can I skip its timeout with a button called "I do not wish to wait"?By the way, it you're not an advanced programmer in PHP / JavaScript, you probable can't help me
  12. For "parentNode" and "childeNodes[]", I previously made my own topic, go have a look
  13. @ Replicators,Why bother writing a SO MUCH too complicated script, for a so simple situation :)having a link that holds its target secret is not realy difficult...This is the normal syntax: And then always the HREF is displayed at the statusbar.To get that not to happen, you can add three levels of protection.1) Change the anchor to this: This removes the link from the statusbar, but still opens the correct target2) Move the actual link even further away into an external file: And in the external file, declare that variable with java script: This completely removes the actual target from the sourcecode, into another file3) Write the External file by looping with PHP. But this does not protect any secret link, only how you are able to easily write the declaring of eg. hundred links. The output PHP gives, may be practically the same as with level 2I hope this helped
  14. Jack McKalling

    php set focus

    Oh, but you do can write the javascript with php, but you don''t want to use javascript at all.If you change your mind, you can do this: (the green is JavaScript)
  15. Okay, here is the deal.I have a main document called "Adminform". It uses "phpEdit" for its forms actions. I have a database with data about category buttons on Adminform. Each button on the page sends the browser to the same Adminform, but with other forms active on it. One of the buttons sends to the form to edit the data that defines all those buttons (including himself).The phpEdit also sends back to Adminform, when it did all the requested actions. For each form it does different things, but only a few different send-through methods. For example: when the action returned an error, it does not send through at all, only show a button to re-input the data at the form.When at Adminform, the user has chosen the form for the category buttons editing, Adminform must use the data from the database. Becouse that form shows some filled fields with representing data for each button. JavaScript is the language that can handle the data inside the form, so it should get its data from the database. However, JavaScript is not able to do that by himself so that is why I wrote with PHP his external file (explained in above post). PHP writes the JavaScripts declaring of all the database data in variables.So when the page loads the button-edit-form, it also loads the external file to be able to use all data. And when the edit is submitted, phpEdit edits both the database and external file.Except, each time Adminform loads that form, it searches his cache for the external file instead of directly downloading it.This means the just updated file does not get implemented, the old one does.-----------I came up with a (still problems causing) sollution.When I use a redirecting META REFRESH at phpEdit before it goes back to Adminform, the external file does get directly downloaded.The problem is, I want phpEdit to offer a "I do not wish to wait"-and-skipping-the-timeout-button (which omits the meta refesh)
  16. When I want to have some PHP variables ready to use for JavaScript, I have to script way round, don't I......I can echo PHP variables into a javascript block like this: Or for bigger situations like this: Whatever hey :)But I don't want to do it like either these methods when the javascript you echo with php will be written through a loop, and therefor may be big.Example: I choosed for an external javascript file.When php comes to echo the javascript block, I let it rewrite the files content with fopen(), fwrite() and fclose().The mayor disadvantage of this, is after the rewrite, the browser also has to know that it should refresh that file and not to get it from the cache.How Can I Do That :)Else I get after the rewriting the same file as before, and not the updated one....Now I have to hit the browsers refresh button every time I visit the page (and rewrote the external file's content)
  17. No not only Submit buttons, just all buttons :)Font-size also hasn't got to do with the padding that is bothering me ?
  18. You forget that an opened window always has a titlebar, unlike a popup :)But, you're right This way one can
  19. Because you are norwegan, I suggest to go to Dhost.info, as your free host :)It is in small words just great, PHP supported :DThen you do have a host, and don't have to rely on the server of W3Schools Dhost.info (new signups unfortunately temporarily closed)On the other hand, it is a good idea
  20. And what about the window.createPopup() (IE only) function?It can be showed at hover and not-showed at mouseout p = window.createPopup() p.specificationsfunction ShowPopup(State){ if (State == "show") p.show(width,height,horizposition,verticposition) else if (State == "hide") p.show(0,0,0,0)}<element onmouseover='ShowPopup("show")' onmouseout='ShowPopup("hide")'>
  21. Do you still have questions about selecting text in some input/textarea fields?Or do you want to select only part of the elements content ?
  22. Don't forget to store the data of the hidden inputs in variables before you use them, and only save the values into the variables when the user hit a certain button. Else it won't work
  23. My input elements are devided into classes like text_buttons, image_buttons, text_field.For the text buttons, I don't want the inputs have padding-width applied :)But this css: Does not work.Also, this won't work: Even not this: In the most maniac way: Won't work!I am using Internet Explorer only, but that doesn't have anything to do with it, can anyone explain me how to reset the padding of a button? For all these styles the button still has padding to the left and right, only text-align:right has effect.
  24. An input can have all styles that also apply to DIVs, like this: It will make the background of all inputs that have class="classname" grey and the border two pixel black
×
×
  • Create New...