makelabel, setlabel - create and set HTML text
makelabel(
s )
setlabel( n, s )
makelabel() creates a new label tag with the text specified by string s on the HTML pop up page. It returns an integer identifier that can be used to refrence the label and change the text displayed.
Like other Tranquility functions that create HTML elements, makelabel() opens a new browser window when called if one had not already existed.
setlabel() changes the text in the label identified by the first argument n to the string s specified by the second argument. n should be an integer identifier returned by an earlier call to makelabel()
Labels will be placed on the HTML page, left to right, top to bottom in order of being called.
makelabel() returns an integer label identifier.
setlabel() does not have a return value.
fun init () { var imgA, imgB var labelA, labelB imgA : makeimg() labelA : makelabel() imgB : makeimg() labelB : makelabel() setimg( .imgA, "dog.png" ) setlabel( .labelA, "This is a picture of a dog" ) setimg( .imgB, "cat.png" ) setlabel( .labelB, "This is a picture of a cat" ) }
Charlie Stuart
cstuart11@protonmail.com
Nathan Xaysena, Fall 21-22
First, check
the Tranquility Programmer’s Manual
https://www.cs.drexel.edu/~bls96/tranquility.pdf
If the problem persists see Dr. Stuart or Charlie Stuart
Dr. Stuart:
brian.l.stuart@drexel.edu
Charlie Stuart:
cstuart11@protonmail.com
html(3), makeimg(3), tranqc(1)
Tranquility
Programmer’s Manual
https://www.cs.drexel.edu/~bls96/tranquility.pdf