Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1101.

Solve : use a iPad to show more then one site (HTML and JS question)?

Answer»

I have a iPad that I easy like to change a WEBSITE so the address to the SITE the page already have so I just want to easy PICK want I want it to show in fullscreen.

I think it is simple but I have no idea how to present it so it looks nice too.

Most if the site is just for show (one is a address to my Magic Mirror server) and some I like to see and click with my fingers (Like Home Assistant)

So if I going to have so I can click, that mean I can't USE a 100% layer that feel what I do with my fingers to change the site.
And I can't have some HTML link under or over the site becurse then is not fullscreen anymore.

Hope someone have idea what I'm after and can GIVE me some feedback what to do.

1102.

Solve : HELP?!!! Front Page?

Answer»

I can't believe I did this...  

I accidently deleted the automatic icons that appear on every page.  You know those ones that appear at the side or top, giving links to all the sister pages?  Well, they're gone.  I thought I could delete it on only one page and I published the web, only to find that they automatically deleted on EVERY PAGE and SINCE I already published the web, they are gone...

I need them back but have no clue how to do so.

PLEASE HELP....

I am so frustrated...  It the pages were deleted off of the web, then that's it... But, if you have the pages saved on your computer, then you can just reupload them, and FIX the page that you deleted the icons off of...

[glb]Flame[/glb]thearc.....So what your saying is you deleted the navigation links or BUTTONS .........Is that right ......?

You still have the HTMLs on file ...right .......?
Is your index.htm still intact ?

Provide a link to your site and LET me LOOK at it .

dl65

1103.

Solve : How do I sync a local direectory with one on my web site??

Answer»

I was thinking about just overwriting the whole directory, but maybe it WOULD be better to use some kind of program that will synchronize the LOCAL and remote directory (folder).
Does that make sense? I have never done that over the INTERNET. Is there some kind of FTP  thing that will make sure only new or changed files are written to the remote folder? Any thoughts welcome. 
Batch file could be used to test between 2 locations for newer files and replace older with newer.

Ages ago I used WS-FTP, which I suppose could be used with a keyboard/mouse MACRO to update between PC and Host.

You could then then add it to the PC as a SCHEDULED task to update on a regular basis a long as the PC is on to perform the scheduled task at the set time.

1104.

Solve : Snapshot a webpage?

Answer»

I need to take a snpshot of an entire page on my website. To try and get the entire thing in a screenshot just doesnt work. So does ANYONE know of a way to do this?If you use Firefox...

Try this Firefox addon:  Screengrab

More INFO...That is exactly what I was looking for and the fact that it is an add-on to firefox makes it even better. ThanksYou're WELCOME...glad I could HELP.

1105.

Solve : Trouble Ticket Express... HELP!?

Answer»

Hello everyone! I have downloaded and unzipped Trouble Ticket EXPRESS, and have also uploaded it's files  to my server as the instructions have instructed me to... Here's the problem... It tells me to go to the URL of my website, and type in setup.cgi as the desired page... I receive a "Page cannot be displayed"... Any Ideas what I am doing wrong?

[glb]Flame[/glb]Flame,
Is there an error number associated with that message?  Off the top of my head it sounds like a security issue, either on the server or your browser.  I am assuming a computer whiz like yourself has checked that the file actually exists and is located in the correct folder.

GaryThe files DEOS axist, and I receive no security codes. It just acts like the file does not exist...

[glb]Flame[/glb]Okey Dokey Flame,

First, I am not a cgi dude, I do ASP with VB and C#, so I may not be much help but I will try to at least spark some inspiration somewhere.  
Are you doing this through IE or Firefox?  If IE, go to Tool....Internet Options....Advanced
and turn off "Show friendly HTTP error messages".  The retry it.  Maybe we can get a useful error message that way.

GaryWell.... Gary.... You hit the nail on the head!   I did what you told me to, and got a useful error message... You'll be pleased to hear about this one... It's just as you told me earlier... The error message is FORBIDDEN... I do not have permission... (error 403)... However, I manage my host with a friend, so let me check the security settings out... Thanks! Any further suggestions are GREATLY appreciated!  

[glb]Flame[/glb]I should also add that I changed the access rights to the files, but still no solution... Also, when I got the error message, it also said that in addition, the page could not be displayed... Here is the URL so that you can SEE what's happening... I think I'm looking for the file in the right place... http://www.atlantawebsiteproductions.com/ttx/setup.cgi ... Please assist...

[glb]Flame[/glb]Flame,

I think the second error message is telling you that you don't have an error page on your server to display instead of the error message.  I could be wrong but I think you can ignore the second error, for now.

GaryOk... Any ideas about error 403 and how to fix it?

[glb]Flame[/glb]No, but the troubleshooting section on the Trouble Ticket Express website MENTIONS......

3.1. Saw Page Not Found 404 Error
That means you either made a mistake typing the url or the scripts directory must be accessed via another URL - please refer to your web server documentation to find out how URLs map to file system directories on your server.

Is your web server Unix or Windows?

Windows I think... I'll have to look...

[glb]Flame[/glb]Flame,
I have access to a unix web server with cgi.  I uploaded TTX to that server and I get the same errors as you.  

Like I said I am not a cgi dude so I may not be much help, but I will keep plugging away at it.

GaryA 403 error is a bit unhelpful really. Unlike most errors, it gives little indication as to what has caused it, just says you can't go there.

There are many, many reasons your server could be doing this. FIRSTLY, double check to make sure you are typing in the full URL (including the extension, .cgi); directory browsing may be disabled, and in most cases is what causes this type of thing.

Also - another obvious one really - check your server actually supports CGI scripting. Quite a few do not, and a security measure on the server may be trying to prevent them from running to stop any malicious attacks.

Otherwise, you may be looking at a much deeper security issue, or more likely a fault in the TTX code. My advice would be to find the TTX forum or some kind of tech support for them and see if anyone else is having the same or similar problems.Thanks for the replies! I'm pretty sure that my server supports CGI, but I will have to check... Also, how do I enable directory browsing? Also, I SHOULD be using the right URL, becuase it works on ALL web pages, but I have never tried files before...    
[glb]Flame[/glb]Re: Directory browsing... erm, pass. I believe the option is in the server's configuration files (possibly httpd.conf, if you are using Apache, I think) so get Notepad at the ready and wade through it all.

But I did have a bit of an idea though. Many servers have a special folder in there called "cgi-bin", which I believe is reserved for CGI files. How you go about working with them I have no idea, but you might find some info on Webmonkey...Thanks for the reply! I'll have to have a better look at my server first...  :-/

[glb]Flame[/glb]

1106.

Solve : Word press help needed?

Answer»

Hello I recently installed a wordpress template into my domain and I have been slowly tweaking it but I really could use someone's help who is more fluent in the process. I would be looking to have someone who can initially finalize what I have to do like correctly resize images for the products page, make sure the shopping cart plugin is correctly installed and do a change on the color scheme which is basically changing lime green buttons to baby blue to match the company logo.

Any help would be terrific and I am willing to negotiate a price for the services in which would be paid via paypal.I recommend finding a professional WEBMASTER. You can find them on any site with freelancers.You can easily change the color using css file.

Go to Theme directory and CHECK for "STYLE.css", from there you will be able to change the color.Here is the free documentation:
https://codex.wordpress.org/
IMO, you should try some of the free templates and see which comes very close to what your want. Otherwise, you can spend hours trying to change some very trivial thing.
Here is free  tool that helps me:
https://www.youtube.com/watch?v=594Ier2CpzY
How To Install WordPress for Windows Using A Localhost
(Skip the AD.)
It lets you test things on your local host instead of your web site.
Let me know if that helps you.   Friends, I want to create a website to promote my coffee business. It is very important for me that, in general, the site looks in a loft style, there are classic vintage letters and fonts. What do you think? What advise in terms of web design? Quote from: Erudre on August 06, 2018, 07:54:48 AM

I recommend finding a professional webmaster. You can find them on any site with freelancers.
I agree. This is the most correct option. You can find professionals on webmasters forums, freelancers sites or contact a special company. For example, New York website design agency, they use WordPress. This is good web design services and WordPress experts. Quote from: karizma on April 09, 2019, 07:01:02 AM
Friends, I want to create a website to promote my coffee business. It is very important for me that, in general, the site looks in a loft style, there are classic vintage letters and fonts. Is this theme any good? What do you think? What advice in terms of web design?
FIRST, make sure you are using a good theme which fits your need. The easiest way to check your competition and use WordPress theme detector tools to find the theme they are using and buy that theme. Then use Fiverr to find someone to set up the theme for you in $5-$15. It is better if you GET your sales pitch text ready by yourself.
1107.

Solve : Frontpage form query problem?

Answer»

When I click Submit Query on my search page, the database returns all results as opposed to the search CRITERIA entered. In fact, I can leave all fields blank and it will STILL return all results in the database. The page (still very much under construction) is located at http://www.driverreport.org/driversearch.asp

Any ideas on this one?  Is it an IIS server you're using with Access database?It is an Access database, however I am not sure what an IIS server is. I know it is on a Windows server (if that helps)  Yes, IIS in the same as Windows.

I'm sorry I don't know much about Access databases, so all I can do is point you in the right direction.
http://www.stardeveloper.com/articles/display.html?article=2000051001&page=1
http://www.hotscripts.com/category/asp/scripts-components/search-engines/Thanks again kpac. I am glad I cam ACROSS this forum. I have posted to many forums across the web and this one blows all the others out of the water as far as knowledge and promtness. No problem and glad I could help. Quote from: kpac on March 18, 2010, 12:08:33 PM

I'm sorry I don't know much about Access databases

ACTUALLY- it uses pretty much the same SQL your familiar with from MySQL.

in this case, it simply looks like there is no actual query being CREATED from the POST'ed data; that is, it is returning all records simply because it hasn't been told otherwise (think, performing a "query" that is just the table name- it returns the entire contents of the table).
1108.

Solve : C# or PHP?

Answer»

Hi there,
I have basic KNOWLEDGE of CSS, HTML, and JS  and I am planning on studying more in ORDER to master programming. In my town, we don't have many academies for programming but at this moment I have the opportunity to choose between C# with .Net and PHP. What would be the wise choice to learn in 2019/2020? Short and quick answer:
GET the Microsoft .NET thing. It is widely used and supported.   
I will LEAVE to to others to tell you about PHP.

1109.

Solve : Adding an email link but remain unseen??

Answer»

Hello. I was WONDERING if anyone knew how to add a "contact me" link to a website (html) but keeping the email address PRIVATE? So, I want to add "Contact me here" as a link to my email address but not have it shown. I use Firefox if that HELPS. Thanks a ton!  The best way is to have the emailing processed by the web server - if you're using PHP or some other web programming language.  Failing this, it is virtually impossible to prevent email addresses being harvested off a web page.  You can try email obfuscation but since it's a known technique, spammers can work their way AROUND it.Here and here are examples of SENDING mail with PHP. The second being more secure.

1110.

Solve : Stop link from opening in new window?

Answer»

I have my LINKS set to "TARGET=main". However a new window opens each time. This happens on all links on all pages of my site. Any idea of what is causing this?  Just REMOVE the target attribute completely.Thanks KPAC! That was quick and PAINLESS.

1111.

Solve : Tracing routes of domain names?

Answer»

hey guys i have a assignment question which i cant figure out, we were given 4 domain names to traces their ROUTES, by going this website www.visualroute.com, after we have DONE the tracing we had to answer 2 questions which were:#

1. what is the significance of the number of hops to a destination?

which i have done

2. why, for a given trace, are the return trip TIMES not always monotonically increasing with the number og hops?

stuck on this 1 COULD some1 help

1112.

Solve : Banning IP range in php file but need a way to allow IP command?

Answer»

I found another POST on this forum that was very useful about banning IP in a PHP file.
I will attach the code below.
I do have a question about this code.
I am using IP Ranges in the ban.txt file.
Sometimes when doing this there is one IP within that range that is a user that does not need to be banned.
How can I add another text file of set it up in the PHP file to allowed IPs and have it override the ban.txt file?
Is this POSSIBLE?
Code: [Select]<?php
$userIp = $_SERVER['REMOTE_ADDR'];
$ips = file('/ban.txt');
$isBanned = false;

foreach($ips as $ip) {
   $split = explode(',', $ip);

   if($split[0] == $userIp)
      $isBanned = true;
      BREAK;
}

if(!$isBanned) {
  echo "It seems you have been banned from viewing this website.";
  echo "
";
  echo "If you think you have been banned in ERROR please contact me.";
  exit();
}
?>

1113.

Solve : New webber?

Answer»

Ok cheers KPac don't want to confuse myself anymore than is needed. Cheers for the input though.Okay then. If you ever want to look for it though, Google is your best friend (or maybe Yahoo). Quote

I think I get it now. So it confuses the website into thinking that another server is requesting the page and repeats this continuous through 'zombie pc's' making the site use up lots of memory dealing with these multiple requests effectively disabling the site's ability to deal with real traffic. I'm probably missing the point but I think I understand what your saying.

Exactly! except, it isn't just memory, but network bandwidth, server CPU time, etc.


By "Zombie PCs" I meant the group of PCs a hacker controls, often without the USER knowing (well, usually without them knowing) via trojans and whatnot, they get control over the REMOTE PC and compromise it, and often times they will launch further attacks from that PC, making it difficult to TRACE the real attacker. All of this happens right under their nose! In any case, once the hacker has control over them, he can get them all to do the same thing- in this case, request a web page from a server- using a crafted packet that uses the wrong "return address". So the server get's these millions of requests from PCs all over the world, and each one identifies it's origin as the other site. the server dutifully sends that other site the data all these PCs requested, which confuses the bejesus out of the recipient, since it never requested it.

So both if the servers will have their capacity reduced. Generally big-name companies not only have multiple servers but also a method of detecting these illegitimate packets, not to mention other checks and balances, so really the hacker will need to be far more clever, perhaps <<>>. Do I have to remove malicious content from that post?

Quote
perhaps REDIRECTING the request to proxy servers all around the world which subsequently all redirect that response to a single server elsewhere.
That might give someone ideas...except, they would need to be in control of the proxy as well.

Besides, I'm just making half of this up as I go along. I'm surprised I've gone this long without some abstracted reference to peanut butter, actually.So and I'm not asking how, but just the basic idea of how it's done. The proxy is the go-between for the client and the server yes? It's like a filter station? How would any body take control of something like that. As I said I don't want the method just the theory. I find this very interesting as it explains a lot of what you read about. I mean is the proxy not controlled by the ISP?If you have your own server, you can set up a proxy.But will they not have there own Proxy to filter out your ATTEMPT?a proxy is just a computer that relays information from a client to some other server. Basically, it "hides" the client from the actual server, since as far as the server is concerned it's connecting to the proxy. Same goes for the client, IE, if an ISP were to block all web pages from competing firms (LOL) then running through a proxy, the ISP will simply see it as such- connecting to the proxy IP, which is not a competing firm. but then the proxy is simply relaying information from that "banned" web page.


getting control of a proxy- assuming you don't own it, is the same as any other PC on the internet.Got you thanks BC makes a lot more sense now. Cheers BC, KPac it was good to learn something new.



1114.

Solve : Trying to upload wordpress site with import buddy.php cant get past step 3?

Answer»

So I am Trying to upload wordpress site with import buddy.php CANT get past step 3
I'm using GODADDY for hosting.

here is video instructions I have:
https://www.youtube.com/watch?v=pIZPLFZ4QkI&t=179s

I think my problem has to do with data BASE not connecting with site or my data base is not working.

What would the exact steps be to SET up data base and connect with site?
Is there another way I can upload blog site??


1115.

Solve : Windows Media player in a web site?

Answer»

I use the media player to view an ASF stream from a web cam. The asf FILE is in a protected folder and the mediaplayer keeps prompting me for a username and password. how do I do this so that when someone views the stream via the website they do not GET prompted?

I use the mediplayer plugin code to display the mediaplayer in the BROWSER.

Can I set some properties to make the username and password available for the media player.

1116.

Solve : how to autoplay audio??

Answer»

How to autoplay audio, when the page is loaded?

I have tried put autoplay in the audio tag, and it didn't work.


 

and I have tried

$(document).ready(function() {
  $("#audio").get(0).play();
  $('#audio').prop("volume", 0.2);
}
then it didn't work.

Is there any other idea to autoplay audio, when the page is loaded?You can take a LOOK at this ==&GT; Playing audio after the page loads in htmlI tested this under IE Edge and it WORKS 5/5 
And with HTA file too 

Code: [Select]<!DOCTYPE html>
<meta http-equiv="x-ua-compatible" content="ie=9">
<html>
<head>
<script>
window.onload = function AutoPlay() {
document.getElementById("my_audio").load();
document.getElementById("my_audio").play();
}
</script>
</head>
<body>
<center>
<audio id="my_audio" src="http://listen.pioneerdjradio.com:8550/stream/1/" type="audio/mpeg"></audio>
</center>
</body>
</html> Quote from: Hackoo on April 20, 2020, 02:09:17 AM

You can take a look at this ==> Playing audio after the page loads in html
The page of STACK OVERFLOW will help you. Like it helped me
1117.

Solve : ***NOTICE***?

Answer»

Ladies and gentlemen... If any of you can remember this, a computer USER left me a message on THIS forum, TELLING me that my webiste host was trying to install a TROJAN virus onto my viewers' computers! I WANT to let everyone know, that I have SWITCHED hosts, and no longer allow pop-ups on my website, so the issue has been resolved! I just wanted to inform everyone about this because I do not want to lose any viewers over this, and I do not want anyone to be worried that they might be INFECTED if you do visit my site. (That will not heppen)  Thanks for READING this message everyone!  

[glb]Flame[/glb]

1118.

Solve : Adding scrolbar to bottom of HTML?

Answer»

Is there a code for adding scroll bar to bottom not the side of a HTML document?

JohnScroll bars automatically appear as needed.  In other words, if you page is too large, in width, to be displayed in the browser window on a computer, then the horizontal scroll bar will automatically appear. Likewise, the VERTICAL scroll bar works the same way.  So, there's no need for a web designer to use some technique to force a scroll bar to appear on a page. A horizontal scroll bar is a no-no for web designers anyway.I wrote  document in HTML it is basically all links in the form of PARAGRAPHS and as you take the mouse and make your window narrower the contents in the window just squeeze narrower, a 10" wide paragraph becomes 2" wide just more pages down, this doesn't seem right?

JohnIf you don't want the size or layout of the page to change, use percentage widths and sizes with everything instead of fixed widths and sizes. Quote from: kpac on JANUARY 21, 2010, 10:47:58 AM

If you don't want the size or layout of the page to change, use percentage widths and sizes with everything instead of fixed widths and sizes.
  kpac, he'd need to do just the opposite to stop the behavior, he'd need to use fixed width, not percentage.No, sorry, I worded it wrong....

If you don't want the page to overflow then use percentage widths. Quote from: John1397 on January 21, 2010, 10:45:47 AM
I wrote  document in HTML it is basically all links in the form of paragraphs and as you take the mouse and make your window narrower the contents in the window just squeeze narrower, a 10" wide paragraph becomes 2" wide just more pages down, this doesn't seem right?
What he's SAYING here is that no scroll bar appears because the page width adapts to the size of the browser window.  This is the behavior he will see with page width set to 100%, right?  In other words, the contents of the page will be shifted around to fit whatever window size the browser is set at.

This is not what he wants. He wants the page contents to remain in place when a visitor shrinks their browser window.  By using a fixed width, the objective will be accomplished.  And, a scroll bar will appear at the bottom of the window if the SITE visitor shrinks their browser window to, or their screen resolution is, less than the fixed width coded in the HTML file. i think u can achieve it by using overflow option in CSS
1119.

Solve : PHP error??

Answer»
$content = "TESTING";
$page = "$name.php";
$file = fopen("\PAGES/$page", "w");
fwrite($file, $content);

It doesn't work.


What error do you GET?Wel, What I am saying is the fwrite() DOESNT MAKE the file.

It runs the code without error.Nevermind KPAC, I fixed it.

Thanks for trying to help, though.Oh, good. Never put a \ in an fwrite() X_X
1120.

Solve : HTML code for Mailing List??

Answer»

does ANYONE know the HTML for creating a simple mailing list box that can send PEOPLE's EMAILS, when entered, to a certain email address? thanksGo to http://www.bravenet.com , and dign up for a free account, and they will show you how to create a HTML BASED mailing list (EASY to use), and more! Give it a shot!

[glb]Flame[/glb]

1121.

Solve : Managed Server Vs Un managed Server which one is better?

Answer»

I run a retail store in Orlando, Florida region and it was running FINE until this feb. But, now due to Covid 19 pandemic the sales of my store has hit drastically. As, there is absolutely 0 sale SINCE then and it doesn't LOOKS to stop anytime sooner. That's why, I am looking to take my store online. For that reason, I am looking to LAUNCH an online store. Although, the ecommerce website development part is over and now it's time for the hosting of the store.
Since, it is created on Magento framework. Therefore, I am looking to host it on the best magento hosting provider and I think AWS is the  ideal host for the job. But, I am encountered by two different terminologies.
https://aws.amazon.com/quickstart/architecture/magento/
https://www.cloudways.com/en/magento-hosting.php
The first one is AWS hosting which is provided by AWS itself. while, the other one is MANAGED AWS hosting which is provided by the third party host named Cloudways. So, what is the difference between the two and which one is the best option.Hi there,

Scroll down to the picture of managed v/s unmanaged and click on read more, on the link below.

https://www.quora.com/What-is-the-difference-between-managed-and-unmanaged-server

Hope this helps

1122.

Solve : help with a html template?

Answer»

hi IVE got this html template here for a logon script on a forum how can i ADD an extra feild (for NUMBERS) and make it so it SAVES it as a variable?#




     
{ibf.lang.login_text}




{ibf.lang.forgot_pass} <a HREF='{ibf.vars.board_url}/index.{ibf.vars.php_ext}?act=Reg&amp;CODE=10'>{ibf.lang.pass_link}[/url]







  <{CAT_IMG}> {ibf.lang.log_in}
  $message
 

{ibf.lang.enter_name}
{ibf.lang.enter_pass}

  {ibf.lang.options}      
 
{ibf.lang.cookies}{ibf.lang.cookie_yes}
{ibf.lang.cookie_no}
{ibf.lang.privacy}{ibf.lang.anon_name}
      
 


1123.

Solve : JavaScript Object Expected??

Answer»

Code: [Select]function choose(idn)
{
var c = comfirm('Are you sure you want to erase all files and start over?');
if(c==true) {
var hrefk = "http://www.herbertsworld.com/index.php?action=select&ID=" + idn;
window.location = hrefk;
}
}
I don't have any clues on what is wrong.Is this is the or ?
What is the "idn" variable?Well, Its in s.js and I link it into the file inside the head tag's.

The links to activate it are:

CREATE your own[/url]


Bluesteel Valthem[/url]


American Valtch[/url]


Western Airway[/url]

Try getting rid of the "var hrefk", like so:

Code: [Select]function choose(idn)
{
  var c = comfirm('Are you sure you want to erase all files and start over?');
  if(c==true) {
    window.location = "http://www.herbertsworld.com/index.php?action=select&id=" + idn;
  }
}
You might also try this for where you call the function:

Code: [Select]<td valign="top">
<a href="#" ONCLICK="Javascript:choose('none');">Create your own</a>
</td>
<td valign="top">
<a href="#" onClick="Javascript:choose('1');">Bluesteel Valthem</a>
</td>
<td valign="top">
<a href="#" onClick="Javascript:choose('2');">American Valtch</a>
</td>
<td valign="top">
<a href="#" onClick="Javascript:choose('3');">Western Airway</a>
</td>
Nope, It still does it.
Need an example?
http://herbertsworld.com/index.php?action=style#
CLICK one of the blue links in the page.

1124.

Solve : Centering image in a new browser window?

Answer»

I need some help regarding HTML.  I am using a thumbnail image as a link on 'page 1.'  When a visitor clicks that image, the exploded view of that image will open in a new window.  But it is not centered.  Here is my basic code:

[/URL]

How do I get the exploded view to be centered when the image opens in a new window?

Thank you!

If you insert the HTML A TAG (< a >) on the FORUMS, it gets relaced with [ url ] unless you put it inside a [ code ] box.

Can you post the code you have again?Ok, thanks!

[a]Okay, try using this example to suit what you want.
http://w3schools.com/js/tryit.asp?filename=try_win_opener

Just change the document.write to write the < IMG /> tag instead of < p >.

1125.

Solve : Javascript runtime error??

Answer»

function p() {
document.getElementById('txts').innerHTML = '$stuff';
}

It says its on line 3.

yes, it's php, i am echo () 'ing the code.Do you mean:

Code: [Select]<php

echo "function p() {\ndocument.getElementById('txts').innerHTML = '$stuff';\n}";

?>
That wouldn't work either, because you have a PHP variable in the middle of the JS, with incorrect apostrophies.

WAIT: sorry, no it is right.

We need the full code to tell you what's right and what isn't though.I nearly smacked you with my parsing hammer then, kpac. 

Heres the code. It's not the php, it's the JavaScript it echo's.

Code: [Select]<?php
$user = $_COOKIE['username251'];
$web = file_get_contents("system/web_$user.txt");
$page = $_GET['page'];
$a = "$web/$page.html";
if(file_exists($a)) {
$stuff = file_get_contents($a);
$stuff = str_replace("'", "\'", $stuff);
$stuff = str_replace("\n", "", $stuff);

echo "
<script type='text/javascript'>
function p() {
document.getElementById('txts').innerHTML = '$stuff';
}
setTimeout('p()', 1500);
</script>

";
echo "<tr><td valign='top'>
<textarea id='txts' name='txts' style='width:100%; height:100%;'>Loading...</textarea></td></tr>
";
}
?>
Your PHP variable isn't correctly nestled.

Code: [Select]<?php
$user = $_COOKIE['username251'];
$web = file_get_contents("system/web_$user.txt");
$page = $_GET['page'];
$a = "$web/$page.html";
if(file_exists($a)) {
$stuff = file_get_contents($a);
$stuff = str_replace("'", "\'", $stuff);
$stuff = str_replace("\n", "", $stuff);

echo "
<script type='text/javascript'>
function p() {
document.getElementById('txts').innerHTML = '" . $stuff . "';
}
setTimeout('p()', 1500);
</script>

";
echo "<tr><td valign='top'>
<textarea id='txts' name='txts' style='width:100%; height:100%;'>Loading...</textarea></td></tr>
";
}
?>
But it still worked... It got the CONTENTS and echo'd still.It echo's this:


Code: [Select]<script type='text/javascript'>
function p() {
document.getElementById('txts').innerHTML = '<html><head><title>bailey</title>
<link type=\'text/css\' rel=\'stylesheet\' href=\'http://herbertsworld.com/templates/xss_1.css\' /></head>
<body background="http://herbertsworld.com/templates/bg1.jpg"><center><div id="A1">
<font style="margin:6px;border-bottom: 1px red dotted;" size=6>My Website Name</font>
<br /><br /><br /><br />
<img src="http://herbertsworld.com/templates/banner1.jpg" title="My Website Logo" />
<div id="A2" name="FOOTER"><a href="http://herbertsworld.com/">Create a free website with HerbertsWorld</a></div></div></center></body>
</html>';
}
setTimeout('p()', 1500);
</script>
Fixed page widthHave you declared the setTimeout functino already?

Can you put HTML tags inside a textarea? I think you'll have to convert it to ASCII. Quote from: kpac on June 10, 2009, 07:50:34 AM

Your PHP variable isn't correctly nestled.

No, that "nesting" is FINE.  I warned you:  *whack*  That was my parsing hammer.  Hurts, doesn't it?

Check the errors generated - if you're using Firefox, install the Web Developer toolbar and check the ERROR console.  I suspect there's a problem with your escaped apostrophes (\').  Javascript is not as nice as PHP in that department.  Try using the htmlentities() function, viz:

Code: [Select]echo "
<script type='text/javascript'>
function p() {
document.getElementById('txts').innerHTML = '".htmlentities($stuff, ENT_QUOTES)."';
}
setTimeout('p()', 1500);
</script>

";
In this case, you do of course have to break out of your double quotes, since you're using a function.  Alternatively, you could do:

Code: [Select]$stuff = htmlentities($stuff, ENT_QUOTES);
echo "
<script type='text/javascript'>
function p() {
document.getElementById('txts').innerHTML = '$stuff';
}
setTimeout('p()', 1500);
</script>

";
1126.

Solve : FRONTPAGE 2000 THUMBNAILS?

Answer»

I made a thumbnail of an image USING the auto thumbnail button.  When I click on this thumbnail, the larger image appears with a white background and uncentered. I WANT the background of the image to be BLACK, without having to create an html for the image.  HOw can I configure this, so that EVERYTIME I click a thumbnail the background following it is black?You can't.

1127.

Solve : Allow user to specify background in URL?

Answer»

Hi,

I'm working on a website that lets you choose a background image from placing it in the URL.

For example, if the URL is http://www.mysite.com?image=http://www.imagehost.com/cat.jpg, the page background will be the image at http://www.imagehost.com/cat.jpg

I think it is possible with PHP but I can't work out how to use it.

My server supports PHP, HTML and Javascript and I'd rather not use Flash Code: [SELECT]<?php

$bg = $_GET['image'];

echo "
<STYLE type=\"text/css\">
  body {
    background-image: url(\"" . $bg . "\");
  }
</style>";

?>

etc. etc....something like this:
Code: [Select]<html><head>
<title>Image VIEWER</title>
</head>
<body>
<img src="<?php
echo $_GET['image'] ?>">
</body>
</html>
curses
oh wait, background image. never mind, heh.Thanks - That worked  Which one? (please say mine...please say mine...) Quote from: kpac on MARCH 09, 2010, 11:20:30 AM

Which one? (please say mine...please say mine...)

Well I'd hope so, SINCE your's changes the background like he wanted and mine just sorta forces in a img tag.
1128.

Solve : Google indexing/web optimisation?

Answer»

Not sure if this is the place to ASK,but......

I am trying to optimise our web site 'wjgregg.com' (because I have just been on a course). The site has been online for at least 2 years, I have made some changes from time to time as we have a cms.

In google, if I do info:wjgregg.com - I can see that google seems to have looked at our home page a few times recently, BUT , as FAR as I can see it has NEVER looked at another page on our site 

Is there a reason for this? What can I do to overcome this problem?

It hasn't indexed any other pages.

Have you built a sitemap?No site map yet - ALTHOUGH I will probably do shortly.

But I am sure other sites are getting indexed without a site map.Well, I doubt Google has anything against you.

There is no reason for Googlebot to not view the pages.....you have a flash animation on there, but there are no links in it, so that shouldn't be a problem. A sitemap would be your best-bet. Once you have that done, sign-in to Google Webmaster Tools (with your Google account, if you have ONE), and there you can submit your site and also submit your sitemap to Google. It's quite simple and very effective. Once you have a sitemap submitted, it will tell you when Google last checked it, how many URLs are in it, and how many URLs have been indexed.More info here:

http://www.google.com/support/webmasters/bin/answer.py?answer=40318&hl=en
http://www.google.com/support/webmasters/bin/answer.py?answer=34654&cbid=1112ey45ufpzx&src=cb&lev=answer
http://www.google.com/support/webmasters/bin/answer.py?answer=34575&cbid=e5uhyy24aaj9&src=cb&lev=answer
http://www.google.com/support/webmasters/bin/answer.py?answer=34658&cbid=s3d738zws3uj&src=cb&lev=answer
http://www.google.com/support/webmasters/bin/answer.py?answer=35769&cbid=-1mkx7fpp9oes4&src=cb&lev=answer

1129.

Solve : yahoomail problem?

Answer»

Hi to evrybody out there! my friend has a problem with ACCESSING his yahoomail account on his computer. the site looks different looks like been infected with a virus and he can't send MESSAGES but can READ them. tried on other computer his yahoomail account looks just well and have no problems. wat maybe the problem with his computer?First, what makes Yahoo! look different on his computer besides the SENDING mail issue? (color distortion, etc.) Also, does your friend have antivirus software? Has he installed any new hardware/software lately?

[GLB]Flame[/glb]

1130.

Solve : Remote Save Trouble...?

Answer»

I designed a small web site (12 pages usijng FrontPage 2001) for myself. On the site I have an excel document that I want to use to save information remotely while away from home. I can open, read, and MAKE changes to the document, but can not save.   Can anyone help?Well you have to download the file, and then UPLOAD it to your server (after MAKING changes). This SHOULD work...

[glb]Flame[/glb]Hi Mike Squire,

It can't work. It doesn't work that way.

This excel document was uploaded by u to the server. When u downloaded, this excel is now on ur CURRENT computer. After u edit and save, this excel is still on ur current computer.

U cannot do a file save to save it into your server!!

What u can do is to use ftp to send this file to your server. This is the same thing that u do when u first upload it to the server.


CheersOr try puttin the Excel file into a compressed folder (zipped), and upload the compressed (zipped) folder to the server that way... I've done that before...

[glb]Flame[/glb]

1131.

Solve : Window not refreshing after popup closed?

Answer»

This is designed to refresh the original window when the popup widow is closed. It isn't working.

Code: [Select]<script type='text/javascript'>
function lola(p) {
if(p.closed == true) {
return false;
}
else {
return true
}
}
function run(p) {
lola(p);
}
function Wait(time,p) {
SETTIMEOUT("run(p);", time);
}
function CSH() {
p = window.open('http://quackit.com/common/link_builder.cfm','popUpWindow','height=500,width=400,left=100,top=100,resizable=yes,
scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no, status=yes');
if(Wait(100, p)) {
location.reload(true);
}
}
</script>Use window.location.reload() to reload the page.How would I loop the (

if(Wait(100,p)) {
location.reload(true)
}
)
part?What is the argument and condition? You'd either be using a for or a while loop.O-my-gosh! It won't work.

Can you just give me one small thing that will do this:

if "p" .closed = true then reload the page or else wait 1 second and repeat

That would be best...
What I am using this for:
I am making a "CREATE new page" link. It will open "p" as a new window. When they close the window, it refreshes the original window.LOL me and loops = no no.

I never quite got the hang of them in JS. Maybe Rob could lend a helping hand? Okay, then this is saying Object Expected; I am looping it this way:

function CSH(p) {
setTimeOut("function(p) { if(true == p.closed) { window.location.reload(true); } else { CSH(p); return false; } }", 10);
}Is there a JS STATEMENT called "closed"? I don't think there is...You'll have to declare that somehow by using what's available.
Unless you tell the browser what "p.closed" means, then it's not going to work.How would I tell it?
This is a code I got from a website:

function checkIfClosed() {
newWindow = window.open("http://", "popupWindow", "scrollbars=no;")
if (newWindow.closed)
   ifClosed()
else
   ifNotClosed()
}Maybe it is RIGHT so, it kind of rings a bell with me.

I really can't help with the loop though, sorry.K, www.webstarts.com did it without looping.
Have any clue how to make a button that will refresh that window onClick that could be INSIDE the popup? That's what they did.Better example of setTimeOut() usage >here<.So... This?

Code: [Select]<script type='text/javascript'>
function CSH(p) {
stop = false

if(p.closed) {
stop = true;
window.location.reload();
}
if(stop == false) {
setTimeout("CSH(p)", 3000);
}
}
</script>Yay it worked! Thanks for all your help!Well done!

1132.

Solve : PHP does not replace \n's?

Answer»

$stuff = file_get_contents($a);
$stuff = str_replace("'", "\'", $stuff);
$stuff = str_replace("\n", "", $stuff);
$stuff = str_replace("\n", "", $stuff);
$stuff = str_replace("\n", "", $stuff);


That is not removing the new lines. It still returns Code: [Select]<p align="center"><font SIZE="7">Bailey's Test Site</font></p>

<p align="center"><font face="verdana" size="5"><font face="courier new" size="4">Welcome to my website. I am currently the only</font></font></p>

<p align="center"><font face="Courier New" size="4">developer of HerbertsWorld. You cannot help. Sorry!</font></p>This of any help?Depending on O/S, "\n" is not the only component of a newline.  Remember that "\r" may also appear.  You want:

Code: [Select]$stuff = str_replace(array("\r", "\n"), '', $stuff); Dear Rob,

Thanks for your help. It really helped alot. I never knew \r was a javascript newline character.

Thanks! Quote from: Bannana97 on June 10, 2009, 12:41:22 PM

I never knew \r was a javascript newline character.

PHP character? I think...But it works in javascript.. Ok, just forget about this. lets say it's both :O*sigh* 

In Windows/DOS world, newlines are traditionally composed of a character return "character" (ASCII 13) followed by a line feed "character" (ASCII 10).  In Unix/Linux/Mac, a newline is traditionally composed of just a line feed.   This is therefore OPERATING system dependent, not programming LANGUAGE dependent.Thank you. and to further confuse things, Mac OS 9 and earlier I believe use just a carriage return!So for that I'd do this?



$? = str_replace("
", "", $?);

No, the example I gave you before covers all eventualities.
1133.

Solve : Premade Forum Website?

Answer»

Hello guys,
I need to create a forum site.
Can anybody suggest me any premade theme or which platform should I choose for it? like WORDPRESS, joomla e.t.c. Which platform would be easy to HANDLE there is no such specific requirement.If you're after a good forum platform LOOK for the link in the footer of this forum  You can try Wordpress

1134.

Solve : server erron in application. ASP.net?

Answer»

I  encountered an error while running my application. The error is indicationg that

Quote

Server error in '/KLU' Application

HTTP error 403 - Forbidden
Version information :ASP.net development server 9.0.0.0

              I'm creating a FTP website NAMED "KLU" in asp.net . I created a default page and provided link to another web page that exist in the directory "App_Data". Whenever clicking on the link it is showing the above message. The directory structure is attached. The links to the pages in the current directory are appearing well in the browser.

Provide me the solution that i can access the web page located in the directory.



[Saving space, ATTACHMENT deleted by admin]change the permissions to the folder.It's not a normal folder that a user creates. It's the folder created by the ASP.net when we are creating the project.

I checked the permissions, and i even shared the folder also. But it doesn't  work. The problem only PERSISTS with that folder only. I created another folder and put the contents in it, and i accessed those contents.


So it's folder created by the asp.net development server, and it should provide the authentication to that folder.
So i need that PARTICULAR access solution. I tried the internet but can't get the perfect solution......


Any one who knows server side programming well can help me.....................

Thank you.
1135.

Solve : href?

Answer»

Helllo,

The following href works fine for my Netxscape win2k browser:



However, the following href does not work at all for me:



Any suggestions concerning my problem, would be most appreciated.

-
PETER rejto.Perhaps because you've made more typo's than most of the developed world combined into the one link. Or maybe it's because you are trying to link to a file on you're own hard DRIVE, which no-one else on the net has any access to.Dear Corrosive:

Yes, I do try to connect to a file on my own harddrive.
I have no problem doing this with other files or directories.  In fact,
if I omit the "... .gsu" string  form my directory path  it
also works.  More SPECIFICALLY, if I move the cardat.html file
to a directory above the "....  .gsu"  directory, it also works.

In other words, my problem is that my Netscape does not recognize the  "... .gsu" string  as a VALID directory.

Is it possible that Netscape does not recognize a valid Win/DOS directory ?  I would love to know the answer.


Loking forward to hearing from you again.

Thanks,

-peter rejto.

Hi rejto,

r u coding in html? i thot hyperlink should be

when u put the
file://C:.........
your link will reference c: drive for the html file, which is not
CORRECT if u move ur html file from it's original location.

do u know about absoluate links and relative links?


Cheers

1136.

Solve : CSS Shift help?

Answer»

OK I found out what I am going to USE to do my  Image Rolover on my web site but I need a little help.

If I use  JavaScript I LOAD one image at a time  and it goes back and forth between the two images and my cause the loading to go slow and look like it has a Flicker.

If I use  CSS   to do the Image Rolover   I load one image   and  use  CSS to just shift it around.

Now I just need to know if I have this PART right?

I will make ONR  BIG  SQARE  image  say  4 inch  high  and  in the  and bottum  of this big  sqare  I then can put my PHOTS I will use.
The image I will use for wen the MOUSE is off the image  will go at the TOP of this sqare.

The image I will use for wen the mouse is ON the image will go at the  BOTTUM of the sqare.

So I will have two images in one big sqare and then Export it as one image and embed it onto my web page.

And with  CSS  code I will only show the part of the image that will be active at that time.

And the shift comes in  so wen the top or  bottum is to be seen   the CSS  shifts the image  so it looks like it is always in the same place???

Do I have this right?

1137.

Solve : Looking for someone to write a "form submit" code for me... PLEASE!?

Answer»

I have the form code written but I am getting completely lost as to writing the "cgi" part which tells it to submit.
I have found a few templates but this is something I am not familiar with and it looks like gibberish to me. If someone COULD write this code up for me I would greatly appreciate it! Thanks in advance.
Here is the form code I would like to have submitted (the only fields I want to be REQUIRED are (name),(email) &AMP; (message) the REST should be optional:




















First nameCountry



Last nameZip



E-mailState



Home telephoneCity



Working telephoneAddress



FaxSpeciality



Message













1138.

Solve : Not sure excatly why this keeps happening?

Answer»

Sorry, but we aren't understanding this backup tool thing.
Before downloading it, trying to make sure maybe we don't already have something on our computers that will do it.
The reason I was asking about
router, please make sure that the HTTP port 80 is open and the FTP port 21 is open.
If you go to the page about this tool. It says Ftp settings and one of the things it lists is 21. Then it talks also about configuring directory and all this other stuff that I don't understand what they mean by all this. Trying to make sure it's not going to somehow mess up the Internet stuff. All this stuff reminded me of an email I got about settings and never got any HELP on how to do the stuff.
So, it looks like maybe the same type of things. I've got a screenshot of it, only other thing is I thought something on here would allow us to upload things so you all can see what I'm talking about, but now I don't see an upload thing anywhere in here.
Plus alot of the instructions on the site doesn't make much since too and talks about configuring things, so making sure this isn't something that mess my mom's stuff up either.
This one thing doesn't make much sense-
If you have not your account, go to www.geocities.com and register PLACE for your website

Which doesn't everyone already have an account? In order to do the website in the first place you have to sign up for an account and then login and create the website.


Quote

This one thing doesn't make much sense-
If you have not your account, go to www.geocities.com and register place for your website

Which doesn't everyone already have an account? In order to do the website in the first place you have to sign up for an account and then login and create the website.
Where did you see this? You probably weren't logged-in when you saw that.

Quote
please make sure that the HTTP port 80 is open and the FTP port 21 is open.
If you go to the page about this tool. It says Ftp settings and one of the things it lists is 21.
Yes, the FTP port is 21.

Download the program from here, then follow these instructions:
- Open your Handy Backup
- On step 2 of New Item Wizard choose Add...->Ftp files...
- Set up your FTP access
- Your Host is ftp.geocities.com, username is your YahooID, and the password is your Yahoo password

Follow the image:
Quote from: kpac on June 11, 2009, 03:12:58 PM
Where did you see this? You probably weren't logged-in when you saw that.
Here is the page I saw it on. It's step #2, right after where it says to download thing. The other thing. It looks like this thing costs money too?
http://www.handybackup.net/web_hosting/geocities.shtml
I probably wasn't logged into where? The internet? We are logged on all the time because we have DSL.

Quote from: kpac on June 11, 2009, 03:12:58 PM
Yes, the FTP port is 21.
Yes, but how do you make sure port 21 is open?
Or would it already be open all the time since we are online all the time since we don't have any dialup connection type of internet anymore. Just trying to make sure we will not be somehow messing something up by misunderstanding any instructions and then somehow messing up the whole Internet and not knowing what to do to fix anything and then having to call Bellsouth and not knowing what to tell them on what the problem is?

Port 21 is always open.

Handy Backup is free, click here: http://www.handybackup.net/downloads/handybackup_setup.msi Quote from: kpac on June 12, 2009, 03:49:07 AM
Port 21 is always open.

I don't understand then. If it is always open, why did instructions say to make sure it is open?



Quote from: kpac on June 12, 2009, 03:49:07 AM
Handy Backup is free, click here: http://www.handybackup.net/downloads/handybackup_setup.msi
Are you sure it's free? When reading on the site, some stuff sounds like it's not free.
Here is something that one thing says:
# You can TRY Handy Backup Online 100 Mb account for 10 days for free. Quote from: AmyR7 on June 12, 2009, 11:25:01 AM
Are you sure it's free? When reading on the site, some stuff sounds like it's not free.
Here is something that one thing says:
# You can try Handy Backup Online 100 Mb account for 10 days for free.

It's free! The link I gave is a direct download link. You have to pay for an online account only if you want it.Also, how do I check the FTP port settings? Can you please help me with that?
You don't need to check. Port 21 should always be open, so I don't know why they put that on the site.Port 21 is always open on what?  On a router?  Nope. Quote from: Rob Pomeroy on June 12, 2009, 03:13:35 PM
Port 21 is always open on what?  On a router?  Nope.

Does a service need to be installed first?This is making us(me and mom) wonder if this might not work right since port 21 has to be open. Due to another site, Webkinz that I use and some problems with the site not working right- in the instructions they sent back in an email, one was to make sure port 21 is open. They did not tell us how to check these settings though. So, we have not been able to do this step since we do not know how to do this.
Then at the end of the email says if this doesn't work to contact our ISP and make sure SECURITY settings on the modem are not set to high. Which since we haven't even checked the settings for the ports, have not called our ISP about this last step of what to do.
I think that issues about ports and port forwarding should be taken to the networking subforum.
1139.

Solve : How do I get the number of "if"s in a string? (php)?

Answer» CODE: [Select]&LT;?php
$CHECK = $_POST['code'];
$numifs = 0;

// RIGHT here..
// How do I check how many "if"s are in $check? 
$numifs = // NUMBER found ^^
?>
Use the preg_match function: http://www.php.net/manual/en/function.preg-match.php

Have a look at the examples.
1140.

Solve : rollover works in FrontPage, not on Web?

Answer»

My rollover images work in FrontPage preview option, but not when I publish that page to the web. Any ideas?
Before ROLLING over them, all LOOKS well. But, put a MOUSE over them and they fall apart! I made sure to publish the onMouseOver images as well. Still not working. Check it out... www.centraldekalb.org.
Thanks in advance for the help!  For anyone who has this problem: I figured out what was wrong. My path for some images was too complete. I had ../My_Pictures/Central_Dekalb/TabOVER.png. Once I changed those to "TabOVER.png" the problem WENT away. Simple problem, simple solution.

- Baron

1141.

Solve : Setting up cupcakes shopping cart with booking/delivery/availability calendar?

Answer»

Hi there,

I am looking for some advice about how best to go about creating a booking system for deliveries for a cupcake company's website.

Basically, I have created a simple HTML website which has been running successfully for some time, but we would like to ADD a shopping cart. I have signed up for Romancart for the shopping cart which seems relatively straightforward to implement.

However, the complication I have found is in trying to limit the number of cupcakes that are available for purchase on any given date.  I need to put a limit on how many cupcakes (whether vanilla, chocolate etc) can be bought per day, as the company has a limit on daily production. e.g. 500 cakes per day across all orders.

I think it's a bit like using Ticketmaster or a hotel booking website, EXCEPT that the limit applies across all different cupcake ranges (rather than just the one set of tickets or one type of room) that a customer might order.

I want to have customers choose their cupcakes from a particular range and add them to the basket, choose other cupcakes and add them too, then choose their delivery date. If the total cupcakes they want to buy exceeds the limit of production for that date (e.g. 490 have been ordered already by other customers and they want to buy 20), I need them to be told that they need to reduce their order or choose another date.

If the cupcakes order is WITHIN the limit, I would like to have the quota of cupcakes "held" for them until they then process their purchase, like on Ticketmaster ("You have 5 minutes to complete your purchase")...

I have contacted a calendar company called phpjabbers.com who think they can help with a customised php calendar, but I'm not sure if this is the right ROUTE, and I'm not sure it will work with Romancart, as it is the Romancart Shopping Cart page that would display the calendar. I have also looked at javascript calendars, but from what I have seen I don't think they can deal with the server side.

Sorry for the long question, but if there is anyone out there who can give me some pointers I'd be really grateful. I am self-taught and very doubtful I can put together the necessary code entirely myself but would like advice as to what I should be doing/who I should be buying the code from.

Something based on ZenCart or osCommerce should do the trick.  Check out the modules for the projects to see if there's anything that fits your requirements.

1142.

Solve : Design Windows Media player?

Answer»

Hi, I would like to know how to add a design to windows Media player and buttons. Then, WRITE actions to those buttons , I am writing my CODE using HTML, Javascript and ASP.
Thank you.Uh, pass.

I've never actually seen a Media Player Applet which has been skinned in a webpage, although I admit I avoid that effect like the plague - so please don't do it. I'd rather not have my dial-up come to a STANDSTILL because you insist on playing Barber's Adagio for STRINGS before you even load any content thankyouverymuch.

Your best BET would be to use Flash to design a little animation that can do this. The following site uses this technique to load it's samples:
www.tidy.com/store

1143.

Solve : UL IMAGE BACKGROUND?

Answer»

I'm making a menu for a web site using CSS. I made boxes using the CSS so each part of my UL has a li that displays parts of my menu home page INFORMATION contacts ect... I make the list seperated them in boxes and when you hover over them the text lights up.
Now my boss wants me to make it so that each BOX in my ul li has a background image can I make a background image for each box in my UL or do I have to make a table to do that. Also how WOULD I do that with CSS. ThanksJust put the list inside a div and set the div background to the image you want.I need a image for each link would it be easier just to use a table?Yes, a table should do you FINE then.Urgh!  No no no!   

Spend some time here at Stu Nicholls' place and soak up the CSS magic.

1144.

Solve : Host??

Answer» HELLO everyone! It has been brought to my attention that my host has put a pop-up on my website that trys to install a TROJAN.... I am now looking for another FREE host that OFFERS FREE web hosting... The only REQUIREMENT that I need to have met, is FTP access... Please help!

[glb]Flame[/glb]As ever, the ODP comes up trumps:
http://www.dmoz.org/Computers/Internet/Web_Design_and_Development/Hosting/Free/Games/

For a gaming site, these may be a good bet, but there are others (go back a stage on the MENU and you'll fnd more options)Thanks for the links Corrosive! (You know I always like them    ) I think I found a NEW host, but I am waiting for them to send the acceptance E-Mail, so we'll see.... Thanks again!

[glb]Flame[/glb]Hello everyone! Well, thanks to Corrosive's link, whcih shows a list of hosts, I have found a host, but am waiting for approval... Just wanted to keep everyone posted...  

[glb]Flame[/glb]
1145.

Solve : css help.,?

Answer»

can someone help me., how to fullrowselect in css and javascript??What do you want to do with the row?when I click the row., it will HIGHLIGHT., and there's a VARIABLE that will hold it.,Here's an approach I would adopt for this kind of thing:

Code: [Select]<tr onclick="ref_id = 1;">
  <td>cell 1</td>
  <td>cell 2</td>
  <td>cell 3</td>
</tr>
<tr onclick="ref_id = 2;">
  <td>cell 4</td>
  <td>cell 5</td>
  <td>cell 6</td>
</tr>

When the row is clicked, a reference variable is set.  This COULD correspond to the position of DATA in an array - or you could pass the variable to an Ajax call or whatever.  That would be easier I think than trying to extract the data from the TD cells.

1146.

Solve : MYSQL and Form Help.?

Answer»

I am creating a kind of ONLINE music library for myself, so far it looks something like this:


I need help when posting new links tho, I want to be able to insert a song name and link and then it will be added to the list above, then these links will be stored in a MYSQL table so that they load every time I open the page. Also I want to be able to remove songs just by clicking remove next to them.

I am not sure how to make the song be 'posted' into the list and how to make it save and load from a MYSQL database.

Here is the html for the page so far, I understand some may need to be in PHP. Thank you for any help you can offer.

Code: [Select]<html>
<head>
<SCRIPT TYPE="text/javascript">
<!--
FUNCTION popup(mylink, windowname)
{
if (! window.focus)RETURN true;
var href;
if (typeof(mylink) == 'string')
   href=mylink;
else
   href=mylink.href;
window.open(href, windowname, 'width=550,height=400,scrollbars=yes');
return false;
}
//-->
</SCRIPT>

</head>
<title>iListen</title>
<style type="text/css">
.MAIN{
top:0px;
margin-left:-8px;
position:absolute;
width:100%;
height:25px
}
.hiden {
visibility:hidden;
}
</style>
<script language=javascript type='text/javascript'>
function debug() {
document.getElementById('loader').style.visibility = 'visible';
}
function hide() {
document.getElementById('loader').style.visibility = 'hidden';
}
</script>
<body>

<div id="main" class="main">
<TABLE BORDER="0" CELLPADDING="0" WIDTH="100%">
<TR onMouseover="this.bgColor='#CCCCFF'"onMouseout="this.bgColor='#FFFFFF'">
<TD>Wiley - Rain (Ft. Charlie Brown) <a href="http://www.youtube.com/watch?v=xDBNr64cXt8" onClick="statuscolor.bgColor='#00ff00'" target="frame" ></a>
<A HREF="http://www.youtube.com/watch?v=xDBNr64cXt8" onClick="return popup(this, 'stevie')">Listen</A>
| Remove</TD>
</TR>
<TR onMouseover="this.bgColor='#CCCCFF'"onMouseout="this.bgColor='#FFFFFF'">
<TD>Kid Cudi vs Wiley - Day 'N' Nite Rolex (Justin Fry remix) <a href="http://www.youtube.com/watch?v=5YyrFGJ1Snk" onClick="statuscolor.bgColor='#00ff00'" target="frame" >Listen Now</a>
| Remove</TD>  </TD>
</TR>
<TR onMouseover="this.bgColor='#CCCCFF'"onMouseout="this.bgColor='#FFFFFF'">
<TD>Boy Better Know - Too Many Men <a href="http://www.youtube.com/watch?v=1B6oz7eadZc" onClick="statuscolor.bgColor='#00ff00'" target="frame" >Listen Now</a>
| Remove</TD>  </TD>
</TR>
<TR onMouseover="this.bgColor='#CCCCFF'"onMouseout="this.bgColor='#FFFFFF'">
<TD>Wiley - Westwood Freestyle <a href="http://www.youtube.com/watch?v=FKzc385G5wU" onClick="statuscolor.bgColor='#00ff00'" target="frame" >Listen Now</a> 
| Remove</TD>  </TD>
</TR>
<TR onMouseover="this.bgColor='#CCCCFF'"onMouseout="this.bgColor='#FFFFFF'">
<TD>Skepta - Heartless Remix <a href="http://www.youtube.com/watch?v=XtebhjPscik" onClick="statuscolor.bgColor='#00ff00'" target="frame" >Listen Now</a>
| Remove</TD>  </TD>
</TR>
<TR onMouseover="this.bgColor='#CCCCFF'"onMouseout="this.bgColor='#FFFFFF'">
<TD>Skepta - Westwood Freestyle <a href="http://www.youtube.com/watch?v=uxPF9Vl3zwM" onClick="statuscolor.bgColor='#00ff00'" target="frame" >Listen Now</a>
| Remove</TD>  </TD>
</TR>
<TR onMouseover="this.bgColor='#CCCCFF'"onMouseout="this.bgColor='#FFFFFF'">
<TD>The Underdog Project - Summer Jam <a href="http://www.youtube.com/watch?v=pMcaDSN3dRo" onClick="statuscolor.bgColor='#00ff00'" target="frame" >Listen Now</a>
| Remove</TD>  </TD>
</TR>

<TR>
<TD><a onClick="statuscolor.bgColor='#00ff00'" target="frame" >

<center>Song Title: <input type="text" name="song" /> </br>
Song URL:   <input type="text" name="url" /> <br>
<a href="#">Add Song</a></center>
</a>
</TD>
</TR>



</TABLE>
</div>

</body>
</html>I'm not sure about the others, but I don't have time to get involved in something of this size (for free! ) sorry.

There are plenty of MEDIA libraries you could install on a web server without going to the trouble of making your own though.  Jinzora Media Server is one that springs to mind, but there are many others.  Hope this helps.You might also try a common CMS, such as Joomla or Drupal.Thanks, very helpful. Appreciated.

1147.

Solve : Very new on webdesign,help?

Answer» HELLO there,
Here i yarn for your help to introduce me to Web Designing and all that a new and greeeeeeeeeeeen ENTRANT like me may need, hear then,
FranciuosStep 1: learn English cuz you'll be coding in it.
Step 2: read a book then follow the examples.http://www.webmonkey.comCorrosive said, "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around darkened rooms, munching magic pills and listening to repetitive electronic music."
I do that. Uh oh? Darn Pac-Man!

To web editing. Another trick is to swipe sights and run them on your computer. Try altering items (colors and words).

To swipe: go to a web page you like in IE. open in IE --&GT; Tools-->Internet Options There you want to delete files and cookies. Then go to View settings --> Display files. Nothing should be there. Then hit refresh. Copy all these files to a DIRECTORY. Then play. Remember to get RID of such things in the file name such as (1).

Cheers!I didn't. It was Kristian Wilson who said that in 1989 when he was a Nintendo of America executive. I didn't have enough space to include the attributation.
1148.

Solve : PHP is not finding correct dir size (%)?

Answer» I am trying to make this PHP code echo the % of space used. (%/100)

It doesn't work.

Code: [Select]function roundsize($size){
    $i=0;
    $iec = array("B", "Kb", "Mb", "Gb", "Tb");
    while (($size/1024)>1) {
        $size=$size/1024;
        $i++;}
    return(round($size,1)." ".$iec[$i]);}
$user = $_COOKIE['usernamm'];
$WEB = file_get_contents("system/web_$user.txt");
$space = disk_total_space("$web/");
$space = $space;
$space = roundsize($space);
echo "$space%";I think it MIGHT be because of $space%.

Try echo "{$space}%";No, I just don't know how to actully "get" the  % from 100..
Any clue?Output (Bites)



2141653.08%


It needs to be  $space/100 into a %.Is this a maths question?!I don't know how to get the file size in php and make it a percentage...I mean directory size XDdivide the size of the item your acquiring the percentage for by the total size.

and then if you want to get the space not used by that item, SUBTRACT the resulting number from 1.

For example if you have a 5MB file on a 1GB drive, that's 5/1024=0.48828125%.Okay. So, this will work ?

Code: [Select]
$space = disk_total_space("$web/");
$space = $space / disk_free_space("$web/");
echo $space;

Quote from: Rob Pomeroy on June 12, 2009, 03:20:47 PM
Is this a maths question?!
.. Yes. . Sorry, we don't have a maths forum  Rob, Banana97 obviously doesn't know the code or the function in PHP to do what he wants to, so he has asked you how to do it - not keep REPEATING the same thing over.looks to me, like he knew all the functions he needed.

Just didn't know the percentage formula.
1149.

Solve : Helpdesk?

Answer»

Hi all! I have a website http://www.gamesfyi.2ya.com , and I get a LOT of comment messages... I want to setup a help desk system, but ONLY on this condition... MUST be FREE... I tried a program called BoldChat once, but I don't want an Instant Messaging application, but one that uses E-Mail, or stores it in a place that I can view it when I'm ready for it... Also, I am not great with web codes, so please keep it simple... Thanks!

[glb]FLAME[/glb]One possible solution is what is called a Dropbox, which is essentially a guestbook that only you can read. Either that or there are various ways of creating mailto: links in HTML forms.

Good old Webmonkey should be ABLE to help with that. www.webmonkey.comThanks CORROSIVE! I'll have a look around...

[glb]Flame[/glb]WELL, I looked around, and I found two programs that "caught my eye"... Ofcourse, then one that I want is hard to install.... lol ... Can someone help? The software that I want to install is: http://www.troubleticketexpress.com/trouble-ticket-setup.html ... I do not fully understand what to do, so if someone can help, that would be GREAT!  

[glb]Flame[/glb]I should also add that I do not know if the default settings will work... (See setup instructions #2) Also, I do not know how to upload files in ASCII mode... Can someone help?  

[glb]Flame[/glb]ASCII mode is just a setting in your FTP software.  You can have Binary, ASCII, or auto select.

GaryOk... I have software that uploads to my FTP server, but I do not know how to upload that as ASCII... Can I just use Notepad to format it to ASCII, and upload the notepad file?

[glb]Flame[/glb]It's not the file type it is the transfer type.  

What FTP software are you using?

Actually, I am using a webiste builder... It is calld IBM Home Page Builder... There is a part of that software called File Transfer, but I have never used it... Should I see what it does? (So I can see if ASCII is compatible)

[glb]Flame[/glb]Couldn't hurt.  It does transfer via FTP and it probably auto senses what method to use.Alright, I'll try it now.... I'll be back with the results...

[glb]Flame[/glb]Ok... I KNOW how to upload my files correctly now!    However, I now have a NEW problem.... How do I create a "scripts directory" on my web server? Is that basically a folder?

[glb]Flame[/glb]Yep, directory is the old term for folder.  They changed the term to folder to make it more "user friendly".  Use your website management tools or your IBM software can probably handle it.

Alright, thanks for the info! Let me try it out...  

[glb]Flame[/glb]Well.... Looks like I'm in trouble now... My host does NOT allow users to upload the file extensions that I need to the server, so I can't upload these files until I SWITCH servers...    Thanks for your help anyway! (At least I know what to do in the future)

[glb]Flame[/glb]

1150.

Solve : XML to HTML help?

Answer»

I have been at this issue for many days now and have not found any solutions. Basically what I'm after is learning how to get BASIC XML data to display on an HTML website. It really isn't more complicated then that. The problem is, everything I've tried isn't working. It just isn't displaying the data. I'm GOING to throw in an easy example below.

I'm using IE7  but have made it so that this code should work in IE6 and IE5 as well. The object is to get the fields: TO, FROM, and MESSAGE to display the XML data that is , and . Clearly something is missing but I just cannot FIGURE it out.

----------------------------------------------------------------------------------
note.xml
----------------------------------------------------------------------------------

<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<note>
  <to>Tove</to>
  <from>Jani</from>
  <heading>REMINDER</heading>
  <body>Don't forget me this weekend!</body>
</note>
----------------------------------------------------------------------------------





----------------------------------------------------------------------------------
My HTML code
----------------------------------------------------------------------------------
<html>
<head>
<script type="text/javascript">
function loadXMLDoc(dname)
{
var xmlDoc;
if (window.XMLHttpRequest)
  {
  xmlDoc=new window.XMLHttpRequest();
  xmlDoc.open("GET",dname,false);
  xmlDoc.send("");
  return xmlDoc.responseXML;
  }
// IE 5 and IE 6
else if (ActiveXObject("Microsoft.XMLDOM"))
  {
  xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
  xmlDoc.async=false;
  xmlDoc.load(dname);
  return xmlDoc;
  }
alert("Error loading document");
return null;
}
</script>
</head>
<body>

<h1>W3Schools Internal Note</h1>
<p>To: <span id="to"></span>

From: <span id="from"></span>

Message: <span id="message"></span>

<script type="text/javascript">
xmlDoc=loadXMLDoc("note.xml");
document.getElementById("to").innerHTML=xmlDoc.getElementsByTagName("to")[0].childNodes[0].nodeValue;
document.getElementById("from").innerHTML=xmlDoc.getElementsByTagName("from")[0].childNodes[0].nodeValue;
document.getElementById("message").innerHTML=xmlDoc.getElementsByTagName("body")[0].childNodes[0].nodeValue;
</script>


----------------------------------------------------------------------------------

Any advice would be greatly appreciated!I don't know much XML, but, since you use W3Schools, have a look at this other example and see if you can make anything of it.

http://www.w3schools.com/xml/xml_to_html.aspBelieve me I have analyzed that website for days now and am getting nowhere. There is something I'm just not seeing.Ouch!  Seriously, I would SAVE yourself a lot of trouble and use the Prototype javascript library.  It's worth the effort to learn.  Consider using JSON to transfer data, too.Thanks, I'll check it out