Tab order and set focus


Author
Message
CatK
CatK
New Member (29 reputation)New Member (29 reputation)New Member (29 reputation)New Member (29 reputation)New Member (29 reputation)New Member (29 reputation)New Member (29 reputation)New Member (29 reputation)New Member (29 reputation)
Group: Forum Members
Posts: 2, Visits: 7
Dave - 4/22/2020
CatK - 4/22/2020
Hi there,

is it possible to set the focus on a specific textbox, when the page initially loads?

Similar to the .focus() method in JavaScript?

Also can we set the tab order of elements on a page in Inquisit?

TIA

There is no .focus() method, but there is a sneaky way to set the focus under some circumstances. If a textbox is set as the 1st question in the page's /questions, it should receive focus when the page loads. Suppose you have a page with three textboxes A, B and C, and wish to set the focus to the middle one (B), then you could do

<surveypage example>
/ questions = [1=b; 2=a; 3=c;]
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox a>
/ caption = "a"
/ position = (10%, 20%)
</textbox>

<textbox b>
/ caption = "b"
/ position = (10%, 40%)
</textbox>

<textbox c>
/ caption = "c"
/ position = (10%, 60%)
</textbox>

Tab order, I believe, should also follow the order given in /questions, so it should be B -> A -> C -> Continue Button -> B -> A -> C -> ...in the above example.

Thank you so much!
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 105K
CatK - 4/22/2020
Hi there,

is it possible to set the focus on a specific textbox, when the page initially loads?

Similar to the .focus() method in JavaScript?

Also can we set the tab order of elements on a page in Inquisit?

TIA

There is no .focus() method, but there is a sneaky way to set the focus under some circumstances. If a textbox is set as the 1st question in the page's /questions, it should receive focus when the page loads. Suppose you have a page with three textboxes A, B and C, and wish to set the focus to the middle one (B), then you could do

<surveypage example>
/ questions = [1=b; 2=a; 3=c;]
/ showquestionnumbers = false
/ showpagenumbers = false
</surveypage>

<textbox a>
/ caption = "a"
/ position = (10%, 20%)
</textbox>

<textbox b>
/ caption = "b"
/ position = (10%, 40%)
</textbox>

<textbox c>
/ caption = "c"
/ position = (10%, 60%)
</textbox>

Tab order, I believe, should also follow the order given in /questions, so it should be B -> A -> C -> Continue Button -> B -> A -> C -> ...in the above example.

CatK
CatK
New Member (29 reputation)New Member (29 reputation)New Member (29 reputation)New Member (29 reputation)New Member (29 reputation)New Member (29 reputation)New Member (29 reputation)New Member (29 reputation)New Member (29 reputation)
Group: Forum Members
Posts: 2, Visits: 7
Hi there,

is it possible to set the focus on a specific textbox, when the page initially loads?

Similar to the .focus() method in JavaScript?

Also can we set the tab order of elements on a page in Inquisit?

TIA
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search