Jump to content

Browser is not displaying localhost.


tommymaster

Recommended Posts

Hi!
This is my code:

window = guiCreateWindow(0, 0, 500, 500, "News", false)
browser = guiCreateBrowser (0, 10, 500, 500, true, false, false, window)
theBrowser = guiGetBrowser (browser)
loadBrowserURL (theBrowser, "http://localhost/index.html")

This is inside a clientsided function what gets triggered from server size. The window called "News" is getting displayed, but the index.html file of my local host won't.  I am using XAMPP, and the file index.html exists, and i can view it in Google Chrome, by setting the URL to "http://localhost/index.html". What may the problem be, could you please help? I want to set up an easy HTML page, and by clicking onto texts it will redirect me to an other HTML file, and if possible, change these files without restarting the resource. Is this possible here?

Edited by tommymaster
Link to comment
 --this gets triggered from server side:
local window = guiCreateWindow(0, 0, 500, 500, "News", false)
local browser = guiCreateBrowser (0, 10, 500, 500, true, false, false, window)
local theBrowser = guiGetBrowser (browser)
addEventHandler ("onClientBrowserCreated", theBrowser, setURL)
--end of function

function setURL()
	loadBrowserURL (source, "http://localhost/index.html")
end

Still it does not work.

Edited by tommymaster
Link to comment

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...