SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Enthusiast
    Join Date
    Apr 2010
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    remove scroll bar

    I have a form that needs to be printed. I've used CSS and print style sheets to accomplish this. However, I cannot remove the "arrow" on a select tag.

    Is it possible to use javascript to do this?

    http://mainly-danish.com/ARD3_current.html

    Click on a radio button under the sentence, "Indicate the number of Curriculum Areas to be evaluated", in order to reveal the select tags.

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,705
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by Ann C View Post
    I have a form that needs to be printed. I've used CSS and print style sheets to accomplish this. However, I cannot remove the "arrow" on a select tag.

    Is it possible to use javascript to do this?
    No, the arrow on a select tag cannot be removed.
    Knowing that, a way to remove the arrow is by removing the entire select tag.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    SitePoint Enthusiast
    Join Date
    Apr 2010
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is there a way to display the selection, but not the select tag?

    i.e. User selects "School Days" Is there a way to print "School Days" and not the select tag?

  4. #4
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,705
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by Ann C View Post
    Is there a way to display the selection, but not the select tag?

    i.e. User selects "School Days" Is there a way to print "School Days" and not the select tag?
    It might be possible to use a multiple view with a size of 1, no - that seems to show scrollbars on it now.

    Perhaps though the people in the CSS forum can help though, they know a lot more about this presentational side of things.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  5. #5
    SitePoint Enthusiast
    Join Date
    Apr 2010
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've asked the question there as well.

    The coding that removes the scroll bar in textareas does not remove the scroll bar in a <select> tag. therefore, I am looking for other solutions.

    Thanks for your replies

  6. #6
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,705
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by Ann C View Post
    I've asked the question there as well.

    The coding that removes the scroll bar in textareas does not remove the scroll bar in a <select> tag. therefore, I am looking for other solutions.

    Thanks for your replies
    An other solution is to have an input field in its place instead. Normally hidden on the page, but updated by a script and shown by the printing style sheet, which would also hide the select element.

    That's the way to do it by removing the select tag entirely from being printed.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  7. #7
    SitePoint Enthusiast
    Join Date
    Apr 2010
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    checkboxes.pngselect.png

    Originally checkboxes were used, but to save space the checkboxes were converted to <select>.

    Are you saying that I could maintain the select tags and use javascript to insert the information into a text field? (The text field would be hidden on the form but visible on the printed copy)

  8. #8
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,705
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by Ann C View Post
    Are you saying that I could maintain the select tags and use javascript to insert the information into a text field? (The text field would be hidden on the form but visible on the printed copy)
    Yes.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  9. #9
    SitePoint Enthusiast
    Join Date
    Apr 2010
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I really appreciate your replies. I would have preferred the solution to be a little less complicated, but alas, everything I've worked on for this customer has been complicated.

    Thanks!


Tags for this Thread

Bookmarks

Posting Permissions

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