Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 21st, 2005, 12:19 PM
Friend of Wrox
Points: 8,019, Level: 38
Points: 8,019, Level: 38 Points: 8,019, Level: 38 Points: 8,019, Level: 38
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2005
Location: Mauchline, East Ayrshire, Scotland
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default remove code from screen - disabled

I have this Code:
<td align="right">
         <div class="font">Returning</div>
        </td>
        <td>
         <div class="font">
     <Select style="height: 20; font-size : 10;" Name="retDay" onchange="javascript: sortMn('IN')">
        <%
        dy = (DatePart("d", date()) + 14)
              nxtMn = False
              if dy > 31 then
                   dy = (dy - 31)
                     nxtMn = True
              end if
        for i=1 to 31
        %>
        <% if i=dy then %>
        <option value="<%=i%>" SELECTED><%=i%></option>
        <% else %>
        <option value="<%=i%>"><%=i%></option>
        <% end if
        next %>
     </Select>
     </div>
    </td>
    <td>
         <div class="font">
     <Select style="width: 110; height: 20; font-size : 10;" Name="retMonth" onchange="javascript: sortMn('IN')">
        <%
        mnNow = Month(Now)
        yr = Year(Now)
              nxtYr = left(yr, 2) & "0" & (right(yr, 2) + 1)
                if nxtMn then
                     mnNow = (mnNow + 1)
                end if
        for i=mnNow to (mnNow + 11)
                ic = i
                nextYr = False
        if i > 12 then
                     ic = (i - 12)
                     nextYr = True
                end if
                mn = MonthName(ic)
        %>
        <% if i=mnNow then %>
        <option value="<%=yr & "#" & ic%>" SELECTED><%=mn & " " & yr%></option>
        <% else %>
        <option value="<% if nextYr then response.write nxtYr else response.write yr %>#<%=ic%>">
                <%=mn & " "%><% if nextYr then response.write nxtYr else response.write yr %></option>
        <% end if
        next %>
     </Select>
     </div>
    </td>
    <td>
         <Select style="height: 20; font-size : 10;" Name="rettm" STYLE="color: black; font: 8pt Verdana, Arial, Helvetica, sans-serif;">
        <%for i=0 to 23%>
        <%if i=0 then%>
        <option value="">Any Time</option>
        <%elseif i>0 and i<9 then%>
        <option value="0<%=i%>00">0<%=i%>:00</option>
        <%elseif i=9 then%>
        <option value="" Selected>Any Time</option>
        <option value="0<%=i%>00">0<%=i%>:00</option>
        <%elseif i >9 and i<=23 then%>
        <option value="<%=i%>00"><%=i%>:00</option>
        <%end if%>
        <%next%>
        <option value="">Any Time</option>
     </Select>
        </td>
    <td>
     <a href="#">
     <img src="asp/images/hd_icon_calender.gif" align="middle" alt="Calendar" width="21" height="15" border=0 onClick="shodt('calendar.html','document.fexp.retD ay.value','document.fexp.retMonth.value','dep',doc ument.fexp.crdate.value,document.fexp.seldate.valu e,'retDay')">
     </a>
    </td>

________________

When this radio button is clicked:

<input type="radio" name="oneret" value="O" onClick="">

______________________________

I want the code above to be removed from the screen, not just disabled, how is this done?

www.crmpicco.co.uk
www.crmpicco.co.uk.tt
www.milklemonadechocolate.uk.tt
www.griswolds.uk.tt
__________________
_______________________
Ayrshire Minis - a Mini E-Community
http://www.ayrshireminis.com
http://www.crmpicco.co.uk
Reply With Quote
  #2 (permalink)  
Old March 21st, 2005, 12:23 PM
Friend of Wrox
 
Join Date: Oct 2003
Location: Chennai, TamilNadu, India.
Posts: 326
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Santhi Send a message via MSN to Santhi
Default

Put this code in if loop and Check for this oneret.checked =true.when it is true only it will be shown.

Reply With Quote
  #3 (permalink)  
Old March 21st, 2005, 12:30 PM
Friend of Wrox
Points: 8,019, Level: 38
Points: 8,019, Level: 38 Points: 8,019, Level: 38 Points: 8,019, Level: 38
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2005
Location: Mauchline, East Ayrshire, Scotland
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default

is that a:

<% if request.form .....

or a

document.form ???

www.crmpicco.co.uk
www.crmpicco.co.uk.tt
www.milklemonadechocolate.uk.tt
www.griswolds.uk.tt
Reply With Quote
  #4 (permalink)  
Old March 22nd, 2005, 02:30 AM
Friend of Wrox
 
Join Date: Oct 2003
Location: Chennai, TamilNadu, India.
Posts: 326
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Santhi Send a message via MSN to Santhi
Default

It is Request.form

Reply With Quote
  #5 (permalink)  
Old March 22nd, 2005, 06:25 AM
Friend of Wrox
Points: 8,019, Level: 38
Points: 8,019, Level: 38 Points: 8,019, Level: 38 Points: 8,019, Level: 38
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2005
Location: Mauchline, East Ayrshire, Scotland
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default

how do i code this? slightly confused

www.crmpicco.co.uk
www.crmpicco.co.uk.tt
www.milklemonadechocolate.uk.tt
www.griswolds.uk.tt
Reply With Quote
  #6 (permalink)  
Old March 22nd, 2005, 07:58 AM
Friend of Wrox
Points: 8,019, Level: 38
Points: 8,019, Level: 38 Points: 8,019, Level: 38 Points: 8,019, Level: 38
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2005
Location: Mauchline, East Ayrshire, Scotland
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default

 <% if show = "" then %>
         <input type="radio" name="oneret" value="R" onclick="location.href='frontPage.asp?show=true'" checked>&nbsp;Return&nbsp;&nbsp;
         <input type="radio" name="oneret" value="O" onclick="location.href='frontPage.asp?show=false'" >&nbsp;One way</div>
      <% end if %>
         <% if show = "true" then %>
         <input type="radio" name="oneret" value="R" onclick="location.href='frontPage.asp?show=true'" checked>&nbsp;Return&nbsp;&nbsp;
         <input type="radio" name="oneret" value="O" onclick="location.href='frontPage.asp?show=false'" >&nbsp;One way</div>
      <% end if %>
      <% if show = "false" then %>
         <input type="radio" name="oneret" value="R" onclick="location.href='frontPage.asp?show=true'"> &nbsp;Return&nbsp;&nbsp;
         <input type="radio" name="oneret" value="O" onclick="location.href='frontPage.asp?show=false'" checked>&nbsp;One way</div>
      <% end if %>

___

<% if show = "true" or show = "" then %>
           <tr>
        <span id="divt1" style="visibility:visible;position:relative;top:0; left:0">
        <td align="right">
        Returning
        </td>
        </span>
        <td>


     <Select style="height: 20; font-size : 10;" Name="retDay" onchange="javascript: sortMn('IN')">
        <%
        dy = (DatePart("d", date()) + 14)
              nxtMn = False
              if dy > 31 then
                   dy = (dy - 31)
                     nxtMn = True
              end if
        for i=1 to 31
        %>
        <% if i=dy then %>
        <option value="<%=i%>" SELECTED><%=i%></option>
        <% else %>
        <option value="<%=i%>"><%=i%></option>
        <% end if
        next %>
     </Select>
     </span>
    </td>
    <td>
     <Select style="width: 110; height: 20; font-size : 10;" Name="retMonth" onchange="javascript: sortMn('IN')">
        <%
        mnNow = Month(Now)
        yr = Year(Now)
              nxtYr = left(yr, 2) & "0" & (right(yr, 2) + 1)
                if nxtMn then
                     mnNow = (mnNow + 1)
                end if
        for i=mnNow to (mnNow + 11)
                ic = i
                nextYr = False
        if i > 12 then
                     ic = (i - 12)
                     nextYr = True
                end if
                mn = MonthName(ic)
        %>
        <% if i=mnNow then %>
        <option value="<%=yr & "#" & ic%>" SELECTED><%=mn & " " & yr%></option>
        <% else %>
        <option value="<% if nextYr then response.write nxtYr else response.write yr %>#<%=ic%>">
                <%=mn & " "%><% if nextYr then response.write nxtYr else response.write yr %></option>
        <% end if
        next %>
     </Select>
    </td>
    <td>

         <Select style="height: 20; font-size : 10;" Name="rettm" STYLE="color: black; font: 8pt Verdana, Arial, Helvetica, sans-serif;">
        <%for i=0 to 23%>
        <%if i=0 then%>
        <option value="">Any Time</option>
        <%elseif i>0 and i<9 then%>
        <option value="0<%=i%>00">0<%=i%>:00</option>
        <%elseif i=9 then%>
        <option value="" Selected>Any Time</option>
        <option value="0<%=i%>00">0<%=i%>:00</option>
        <%elseif i >9 and i<=23 then%>
        <option value="<%=i%>00"><%=i%>:00</option>
        <%end if%>
        <%next%>
        <option value="">Any Time</option>
     </Select>

        </td>
    <td>
     <a href="#">
     <img src="asp/images/hd_icon_calender.gif" align="middle" alt="Calendar" width="21" height="15" border=0 onClick="shodt('calendar.html','document.fexp.retD ay.value','document.fexp.retMonth.value','dep',doc ument.fexp.crdate.value,document.fexp.seldate.valu e,'retDay')">
     </a>
    </td>
</div>
   </tr>
<% end if %>
<% if show = "false" then %>
<tr><td>&nbsp;</td></tr>
<% end if %>


www.crmpicco.co.uk
www.crmpicco.co.uk.tt
www.milklemonadechocolate.uk.tt
www.griswolds.uk.tt
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
code to remove ms word special characters vikaspa Pro PHP 0 November 27th, 2008 10:20 PM
Need code to open the printer dialog screen donrafeal Access VBA 1 June 13th, 2006 01:35 PM
Open a Parameterised Query to screen using code vbark Access VBA 2 June 5th, 2006 05:46 PM
remove eval from code crmpicco Javascript How-To 5 November 30th, 2005 06:51 AM
Code to Remove Carriage Return From Spreadsheet Jersey Eric Excel VBA 2 May 12th, 2005 08:35 AM



All times are GMT -4. The time now is 09:46 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.