Sign in to follow this  
Followers 0
BreCalmor

Radio, Text, Form - Oh My !! doesn't this find them...

2 posts in this topic

<FORM method=post name=quiz_dates_form action=../servlet/quizassignmentservlet>
<INPUT value=153272 type=hidden name=course_id> <INPUT value=236877 type=hidden name=quiz_id>
<INPUT value=../instructor/quiz_repository.jsp?pl=qm&amp;cl=qm_ov type=hidden name=return_page> 
<TABLE style="MARGIN: 0px auto; WIDTH: 95%" cellSpacing=2 cellPadding=2>
<TBODY>
<TR class=headerCell>
<TD colSpan=2><STRONG>Active Dates</STRONG></TD></TR>
<TR class=elementCell>
<TD style="TEXT-ALIGN: right; WIDTH: 50%">Class Title: <STRONG>Science</STRONG></TD>
<TD>This is the class to which the quiz will be assigned.</TD></TR>
<TR class=elementCell>
<TD style="TEXT-ALIGN: right; WIDTH: 50%">Quiz title: <STRONG>4.6 Weather Review - 11/04</STRONG></TD>
<TD>This is the quiz you wish to assign to this class.</TD></TR>
<TR style="BACKGROUND-COLOR: #eeeeee" class=elementCell>
<TD><INPUT value=0 CHECKED type=radio name=isQuizAlwaysActive> Specify active dates.</TD>
<TD>All times are CST(US/Chicago)</TD></TR>
<TR class=elementCell>
<TD style="TEXT-ALIGN: right; WIDTH: 50%">Start date: <INPUT size=25 type=text name=active_date> &nbsp; 
<A href="javascript:calStart.popup();"><IMG border=0 alt="Click Here to Pick up the date" src="../instructor/img/cal.gif" width=16 height=16></A> <BR>mm/dd/yyyy hr:min:sec </TD>
<TD rowSpan=2>Click the icon to get the pop-up calendar (be sure to fill in both date and time on the calendar), or type in the date and time in the format specified below the field. Repeat this process for both start and finish dates. </TD></TR>
<TR class=elementCell>
<TD style="TEXT-ALIGN: right; WIDTH: 50%">Finish date: <INPUT size=25 type=text name=inactive_date> &nbsp; 
<A href="javascript:calEnd.popup();"><IMG border=0 alt="Click Here to Pick up the date" src="../instructor/img/cal.gif" width=16 height=16></A> <BR>mm/dd/yyyy hr:min:sec </TD></TR>
<TR style="BACKGROUND-COLOR: #eeeeee" class=elementCell>
<TD><INPUT value=1 type=radio name=isQuizAlwaysActive> Quiz is always active.</TD>
<TD>All times are CST(US/Chicago)</TD></TR>
<TR class=elementCell>
<TD></TD>
<TD>There is no start or finish date for this quiz. It will be available immediately and will remain so indefinitely. </TD></TR>
<TR class=elementCell>
<TD style="TEXT-ALIGN: right; WIDTH: 50%">
<A href="../instructor/quiz_repository.jsp?pl=qm&amp;cl=qm_ov"><IMG border=0 src="../images/cancel.gif" width=57 height=20></A> 
<INPUT value=Assign alt="Assign quiz" src="../images/assign02.gif" width=50 height=20 type=image name=assignbutton> </TD>
<TD>"Assign" will complete the process of assigning the quiz to the class. You will return to the page you came from when this process is over.</TD></TR>
<TR class=elementCell>
<TD></TD>
<TD><STRONG>NOTE: Student response data will automatically be removed from the server after six months. </STRONG></TD></TR></TBODY></TABLE></FORM>

; Assignment Screen
$oForm = _IETagNameGetCollection ($oIE, "quiz_dates_form")

; Click the is always active radio button
;<INPUT value=0 CHECKED type=radio name=isQuizAlwaysActive>
_IEFormElementRadioSelect ($oIE, 0, "isQuizAlwaysActive", 1, "ByIndex", 1)

; Enter start date in text box
;<INPUT size=25 type=text name=active_date>
$oText = _IEFormElementGetObjByName ($oIE, "active_date")
_IEFormElementSetValue ($oText, _FormatDate($sStartDate))

; Enter end date in text box
;<INPUT size=25 type=text name=inactive_date>
$oText = _IEFormElementGetObjByName ($oIE, "inactive_date")
_IEFormElementSetValue ($oText, _FormatDate($sEndDate))

; click Assign button
_IEFormImageClick ($oForm, "assign02.gif", "src", 0, 1)

--> IE.au3 V2.4-0 Error from function _IEFormElementRadioSelect, $_IEStatus_InvalidObjectType

--> IE.au3 V2.4-0 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidObjectType

--> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType

--> IE.au3 V2.4-0 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidObjectType

--> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType

Ok, this has been frustrating me for way too long. It has proven to me how stupid I am. I mean, how dang hard can it be to select a radio button, enter text into a couple text boxes and then click on an image...

If anyone is bored (pot shots welcome) and wants to point me in the right direction, I would greatly appreciate it.

It's late, I am grumpy, I will check this again tomorrow.

Thanks,

Bre

Share this post


Link to post
Share on other sites



; Assignment Screen
$oForm = _IETagNameGetCollection ($oIE, "quiz_dates_form")

; Click the is always active radio button
;<INPUT value=0 CHECKED type=radio name=isQuizAlwaysActive>
_IEFormElementRadioSelect ($oIE, 0, "isQuizAlwaysActive", 1, "ByIndex", 1) 

; Enter start date in text box
;<INPUT size=25 type=text name=active_date>
$oText = _IEFormElementGetObjByName ($oIE, "active_date")
_IEFormElementSetValue ($oText, _FormatDate($sStartDate))

; Enter end date in text box
;<INPUT size=25 type=text name=inactive_date>
$oText = _IEFormElementGetObjByName ($oIE, "inactive_date")
_IEFormElementSetValue ($oText, _FormatDate($sEndDate))

; click Assign button
_IEFormImageClick ($oForm, "assign02.gif", "src", 0, 1)

$oForm = _IETagNameGetCollection ($oIE, "quiz_dates_form")

should be something like:

$oForm = _IEFormGetObjByName($oIE, "quiz_dates_form")

Look at the help file for the difference between the use of these two functions.

Then...

_IEFormElementRadioSelect ($oIE, 0, "isQuizAlwaysActive", 1, "ByIndex", 1)

should be something like:

_IEFormElementRadioSelect ($oForm, 0, "isQuizAlwaysActive")

You'll want to reference the form when working on the form elements, not the IE application.

Then...

For the rest of the lines when you reference $oIE, you'll want to reference the form instead, $oForm. These functions that work on form elements need an IE's form object as the object parameter, not the IE Application object. Make sure $oForm was successfully attached to the IE form by checking if it's an object before trying to work with it.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0