Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8245585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T22:13:36+00:00 2026-06-07T22:13:36+00:00

Here’s the basic flow of the webpage I’m working on: User clicks a button,

  • 0

Here’s the basic flow of the webpage I’m working on:

  • User clicks a button, date /time picker pops up (works).
  • A time string fills a textbox, say, 4:00 AM (works).
  • User then has to select one of two radio buttons, which should read the time in the text box, radiobutton1 adds 4 hours, radiobutton2 adds 4.5 (does not work).
  • The total hours is then displayed in another textbox (haven’t gotten to this yet).

Other than the 1st item (which retrieves the dates from a server), most of the work is done by Javascript.

So here’s the Javascript I’m working on:

function setHours(setting)
{
    var tempVal = document.getElementById('<%=Text6.ClientID%>');
    var nHours;
    var textHours = new DateTime(tempVal);
    alert(tempVal);
    textHours = getHours
    if (setting==true) {
        nHours = 4;
        alert("4");
    }
    else {
        nHours = 4.5
        alert("4.5");
    }
    textHours.setHours(textHours.getHours() + nHours);
    document.getElementById("text8").value = textHours;
}

This function is called when the user clicks on either one of the two radiobuttons (one passes true, the other passes false). Notice that I have “alert”s scattered throughout, because initially, I couldn’t get the entire function to fire. So I commented out everything but the “if statements” and the “alert”s, and lo and behold it works fine.

I’m assuming the problem is somewhere in the var, perhaps, how “tempVal” retrieves the value in text6.

Here’s the code for the textbox.

<form id='frmRequestApplicationForm' name='frmRequestApplicationForm' action='#' method='post'>
<input class="textboxdefault" type="text" name="Starttime" id="Text6" value="<%=(requestApplicationForm.StartimeError.ToString().Equals("")?requestApplicationForm.StarttimeDate.ToShortDateString().Equals("1/1/0001")?"":requestApplicationForm.StarttimeDate.ToShortTimeString(): requestApplicationForm.Starttime)%>"/>
</form>

Building the program nets me a “Text6 does not exist”. I’m not sure where the code refuses to work.

Replacing “<%=Text6.ClientID%>” with a simple “Text6” makes the entire Javascript function fail.

Could I have some help on this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T22:13:38+00:00Added an answer on June 7, 2026 at 10:13 pm

    Nevermind.

    I replaced “document.getElementById('<%=Text6.ClientID%>');” with

    document.frmRequestApplicationForm.Text6.value;
    

    Seems to work fine now.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's the flow that I am trying to achieve: 1) User uploads an audio
Here is the code in a function I'm trying to revise. This example works
Here is the code: create table `team`.`User`( `UserID` bigint NOT NULL AUTO_INCREMENT , `Username`
Here's the basic setup: I have a thin bar at the top of a
Here is a code snippet I was working with: int *a; int p =
Here is what is supposed to happen: The moment the user chooses an option
Here's a query that works fine: SELECT rowid as msg_rowid, a, b, c FROM
Here is my code (Say we have a single button on the page that
Here is what I am trying to achieve in PHP: I have this string:
Here's a basic regex technique that I've never managed to remember. Let's say I'm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.