How do you make text change every time someone refreshes the page? - html

Is there a way to make text change every time someone refreshes the page?
Basically, I want it to choose from a random text database and select 1 sentence and put it on the website. Is there anyway how?

You can use JavaScript for that :)
Just add a window.onload() event that fetches this data from the database and inserts it in the page.
More info about onload here - https://www.w3schools.com/jsref/event_onload.asp

Related

Scroll Multiple Text Fields using Action Script 3.0

I am trying to build a Flash application which would display data from a external source and scroll it from left to right.
I am new to action script world, i have found an example in which text is scrolling but here there is only one text field. I would like to have multiple text field depending upon my data loaded from external source. How can i achieve it. Do i need to create 10 text fields if my external data returns 10 records.
Any advice on this would be appreciated. Thanks
It depends on your task, if you need 10 lines of text information that moves independently, so you will need 10 text fields. Or you could scroll one text field and change it's content with a new information (next record). For scrolling of the text field you will need Timer or Enter frame handler or Tweening engine, as for changing text you will need some logic, like if text goes offscreen - show another text data.
For me, your question looks very similar to this one, check it, maybe it will be helpful for you.

Disable object, during busy cursor showing

I've a complex text field which I can embed types of font within it. When I try to choose a specific font through the Dropdownlist, I'll show the busy cursor till font embeds inside the text field completely.
I want to disable my text field based on showing busy cursor... I mean when the busy cursor is showing disable the text filed and after disappearing that, just enabled text field again.
How can I do that?
Is there any specific listener for that or what?
Thanks in advance
If you share some code it would be easier to answer. Or just try this, just check the condition over there there is a method called useHandCursor or useBusyCursor. where you used to show that method. just check that condition and disable that. I hope it works.

Download certain part of HTML code

I am trying to make a push notification about Internet page update, but downloading the full page (700k) again every minute is quite troublesome for users. Is there is a way to download only a specific part of page?
As far as I have read there isn't any way to get delta information about the page. Is there a method which allows that? I haven't found one for a day (if there is, how can I locate the certain byte where my information is placed in the first place?
What you want to do is learn some basics in AJAX calls.
You set an auto timer to reload div contents on whatever needs to be updated.
You could use a Range header like this:
Range: bytes=0-1000
This will obviously get you the first 1000 bytes.

hyperlink field in table doesnt work

I have an Access table that has a hyperlink field, with the records being a website link, to look up the UPS Worldship shipment tracking#. My problem is that even though the text has blue colored font, the link doesn’t launch and open the web browser when I click on the field.
originally the hyperlink did work, when I created the table and changed the field properties from “text” to “hyperlink”, but once I ran a delete query and an append query (in order to refresh the data), the link no longer functioned, even though the field has hyperlink properties.
Here is an example of my hyperlink record that I want the browser to launch: http://wwwapps.ups.com/WebTracking/processInputRequest?sort_by=status&tracknums_displayed=1&TypeOfInquiryNumber=T&loc=en_us&InquiryNumber1=1Z1467826772975386&track.x=0&track.y=0
Please advise what I need to do in order to make the hyperlink work, so the user doesn’t have to manually copy and paste the link into a web browser.
Thank you very much in advance
Nathaniel, Access 2003
I don't understand what you mean. I need to create an Access app that would be used throughout the day in order to track UPS packages. Ideally the table would provide a link, so that the user doesnt have to manually copy and paste the tracking number into the UPS website. Please advise if this is feasible without VBA.
I do not like hyperlink fields, they are difficult to edit and somewhat confusing for the user. I prefer to use a click event with FollowHyperlink. However, if you must use hyperlink fields, they have to have this format to work:
Descriptive text#link#
So
Stackoverflow#http://stackoverflow.com#
http://stackoverflow.com#http://stackoverflow.com#
Email#mailto:mail#example.com#
I imagine you have lost the link - that is, the bit between the hash signs.
Try going back to the table with the record and change the data type to short text. Close and reopen the table and switch the data type back to hyperlink. If the text is a valid webpage link it should work without any extra coding.
Good luck!

How to Load the page First and read database

HTML form has some text boxes and a drop down box.
Drop down has huge values, and takes lot of time to fetch from database.
So I want to load the page first and while the user fills the form (text boxes) I want to load the drop down box (without his knowledge :-) ).
But without any event trigger, how do I make call to database again ?
I am using JSF with RichFaces, Servlet.
The following code is not working
<h:selectOneMenu value="#{obj.selectedValue}">
<f:selectItems value="#{obj.allValues}" />
<a4j:support selfRendered="true" action="#{bean.action}"/>
</h:selectOneMenu>
Thanks,
+1 for using Ajax - but if you have a very large number of values,t hen you might want to consider using an auto completion dropdown - where the the user starts typing what they need and after they have typed a few characters, you kick off your ajax reqeuest and just load those requests that match.
have a look at "google suggest" if you want to see this in action
-Ace
As already mentioned you can use AJAX to load the dropdown items asynchronously, but I would suggest redesigning the form so that the huge dropdown is not required. Perhaps let the user search for the correct value on a previous or subsequent screen? Long dropdowns are not easy to use as they require lots of scrolling and it can be hard to find the correct value on a large list.
At the bottom of your page put the following:
<a4j:jsFunction name="yourJsFunction" action="#{bean.fetchSelectItems}"
reRender="yourDropdown" />
window.onload = yourJsFunction();
You will have to use AJAX. When the page loads display a empty select box. Then write some JavaScript that will call some URL on your server that will return the options for the select box. And when you get that just populate the select box with those values.
Be advised that your form will be useless to those without JavaScript.