Submit Your Article Forum Rules

Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: two style sheets problem

  1. #1
    Junior Member
    Join Date
    Aug 2011
    Posts
    4

    two style sheets problem

    i have a problem which i cannot solve..

    i found a nice php popup contact form for my page which aldready has layout.css and this contact form has its own .css file which is called popup-contact.css

    the contact form work without a problem with its test page:

    tercume.pro/a-page.php

    when you click on the yellow "contact us" button you will see that the form is nice and
    styled..



    however,


    when i implement it to my website tercume.pro/index.php where the form is supposed to be,and click on the picture with numbers on, you see that the form does not get rendered and is without the style and even the "close link" is not visible, whereas it is properly styled on thea-page.php

    when i get rid of the layout.css in the index.php, then the form is styled but then the page is not..

    i wanna have both the styles in one page..

    so how can we solve this?

  2. #2
    Moderator HTMLBasicTutor's Avatar
    Join Date
    Apr 2010
    Location
    Canada
    Posts
    924
    Works fine for me in IE8, FF and Chrome.

    What browser are you using?
    Last edited by HTMLBasicTutor; 08-09-2011 at 02:13 AM.
    Accrete Web Solutions - Search engine friendly websites, ecommerce websites & blogs
    Web Page Mistakes - Web page mistakes with solutions
    HTML Basic Tutor - HTML help to learn HTML basics

  3. #3
    Administrator weegillis's Avatar
    Join Date
    Oct 2003
    Posts
    5,785
    Are you putting the layout style sheet before the form style sheet in the resource calls? If this is reversed, weird things can happen when style rules collide.

  4. #4
    Moderator HTMLBasicTutor's Avatar
    Join Date
    Apr 2010
    Location
    Canada
    Posts
    924
    Quote Originally Posted by weegillis View Post
    Are you putting the layout style sheet before the form style sheet in the resource calls? If this is reversed, weird things can happen when style rules collide.
    I thought of that also. But when it worked for 3 different browsers for me I then thought of a cross-browser issue.
    Accrete Web Solutions - Search engine friendly websites, ecommerce websites & blogs
    Web Page Mistakes - Web page mistakes with solutions
    HTML Basic Tutor - HTML help to learn HTML basics

  5. #5
    Junior Member
    Join Date
    Aug 2011
    Posts
    4

    solved

    problem solved.

    thanks for all the answers..

    well, i just had to change relative font sizes to fixed ones in the contact form's css.

    now just one more thing: once the form is sent all the info sticks in the labels and is there a way to have all the boxes cleared once the form is submitted?

    or just i ask this question under php forum?

  6. #6
    Administrator weegillis's Avatar
    Join Date
    Oct 2003
    Posts
    5,785
    Are you confirming that the message is sent successfully on the same page as the form?

    What you could do is jump to another page (on successful submission) and then break the back button so the form can't be got at through history, but can only be navigated to, which will bring up a cleared form, ready for the next fill in.

  7. #7
    Junior Member
    Join Date
    Aug 2011
    Posts
    4
    Quote Originally Posted by weegillis View Post
    Are you confirming that the message is sent successfully on the same page as the form?

    What you could do is jump to another page (on successful submission) and then break the back button so the form can't be got at through history, but can only be navigated to, which will bring up a cleared form, ready for the next fill in.
    you can see it yourself here if it's okay with you:
    i cannot share links now ("To be able to post links or images your post count must be 10 or greater. You currently have 2 posts.") i thought i was able to post links on my previous post.

    anyways..

    this is not a page that pop ups though. it is modal popup window with ajax submission. so there is no back button at all.

    once the form is submitted successfully, the contact info stay in the boxes and does not clear unless you F5.

  8. #8
    Administrator weegillis's Avatar
    Join Date
    Oct 2003
    Posts
    5,785
    Then it's a simple JavaScript call at the completion of on submit validation. All of the fields are contained in one object. Set it on exit to ="" or =NULL, perhaps?


    <edit>
    I'm just throwing this out here...

    Perhaps you could simply create a new form object? I don't know that this would be good, though, as they would stack up and take up a lot of space; i.e., wasteful. But with good management this could also be eleviated? (I ask, because object oriented programming is not my forte.)

    </edit>
    Last edited by weegillis; 08-09-2011 at 06:01 PM. Reason: edit

  9. #9
    Administrator weegillis's Avatar
    Join Date
    Oct 2003
    Posts
    5,785
    Here's another thing that will require a little more study on my part, but you might think on it, as well, the form data array itself. Data in fields is pushed into the array. Could it just as easily by popped out as a way to reset the array? Again, not too wise in this area, but get the gist. The history array is a good example of push and pop.

  10. #10
    Administrator weegillis's Avatar
    Join Date
    Oct 2003
    Posts
    5,785
    Skip that. The form submitter script has the form object in one variable, frmobj. Set it to, frmobj="" as a part of the success result, perhaps?

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •