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.

1201.

Solve : Updating website content help??

Answer»

Hey

I have as website for my Theatre company and on each page there is a "Latest News" box. and the info in the box is the same on every page.

At the moment, every time I update the latest news, I have to go into each of the pages editors to update the info.
What i'd like to do is use a code so that when i update it on one page, it does it on all.. Cut down on time...

Can anyone give me an insight into what code i cna use to do this?

My site is HTML coded

Many thanks

Rhys
Your site address?
What type of the board do you have?www.phoenixartsdg.co.uk

Board?     

I do it all through freewebs if that helps?

I'm not very familiar with freewebs,  but I found this on their site:

Quote

What programming languages can I use?

Premium service customers can use CGI/Perl. However, this type of programming is not available for free account holders, nor do we support the use of MySQL, MSACCESS or PHP. You can, however, link to remote scripts from your website.

Your editing POWERS are pretty limited then.

I'm pretty sure, someone will chime in here with some SCRIPT, which will help you out.I have it on settings so that I code everything myself, instead of using their limiting editors...

My entire website is in HTML coding.There are few guys around here, who can help you out with that. Just be patient.Thanks with only HTML and client-side processing your options are limited, but you can use a "IFRAME" element.

For example, make a news page- say, news.html. Then you can insert it into each of your pages with ARGH! Use small tags!



I don't know why people started using CAPS for tags in the first place because it takes longer to type out anyway!CAPS ISUSED to be considered good practice to make it easy to differentiate what is content and what is markup. The "it takes longer to type" argument is redundant. It also takes longer to type out hungarian notation, like "GFlIsFirstInstance" or "MStrExpression" But people still use it. And personally it has no affect on me anyway- after all, typing the opening < requires a shift.

It was originally part of the spec, with HTML 4 it is "recommended" to use lowercase tags. XHTML requires it. Honestly though, XHTML is simply ludicrous. It doesn't add anything beneficial over HTML itself aside  from allowing the page to be validated by simply using an XML validator and the proper XML Schema. And realistically it just makes that easier, HTML is validated as well, but the rules regarding some tags (break, hard rule, paragraph) are lax and an ending tag isn't required. and for things like br, where content wouldn't make any sense anyway, it makes no sense to even allow content, XHTML would account for forcing the use of either ending tags or a traling / to indicate the tag is EMPTY. I cannot even guess what the X in XHTML stands  for, but it isn't any more eXtensible then HTML itself.I should have known that was coming.

To some extent I agree, but then again the Web is evolving - then comes HTML5. Quote
I should have known that was coming.
Yes. it is easy to get BC started.
1202.

Solve : Center Align Website with Containment Layer?

Answer»

I am nearing completion of a website, and cannot remember the code to center the website in the browser window. I am using layers in Dreamweaver 8, and below is the code that I am using, but the website is still aligned on the left when I preview it. The website size is 800 pixels WIDE by 600 pixels tall.

In the past I designed a website very similar to the one I am working on now, and I used Layer 0 as a containment layer (so this is what I am trying to do now).

#Layer0 {
position:absolute;
left:50%;
top:50%;
width:800px;
height:600px;
margin-left:-400px;
margin-top:-300px;
z-index:0;
}

THANKS. This is a problem many people run into.

You NEED to create a seperate DIV around all your page content, just inside the body TAG. Give it an id of "container".
Now create a STYLE for that div as follows:
Code: [Select]div#container {
  width: 100%;
}

Then use the following style for your main page content:
Code: [Select]div [???] {
  width: 800px;
  margin: auto;
}

It's basically setting the margin of your page's content to auto which does it but you need the container div for it to work.

1203.

Solve : A screenname "GloryFades71" if anyone wa?

Answer»

GloryFades71
pass= wedxnexknarw
Take it!  Its ursUh, kaaaaaaaaayyyy... LOL RANDOM lol POINTLESS

1204.

Solve : Picture Not Showing?

Answer» http://02d5b5c.netsolhost.com/


This is a web site I created one of the pictures I put in will not show on Internet IE but it will in firefox what do you think the problem might be? I have the picture in the folder named right and everything. My code is alittle messy I'm very new to web design. Quote from: rockstar4cs on June 26, 2009, 07:07:30 PM
http://02d5b5c.netsolhost.com/


I have the picture in the folder named right and everything. My code is alittle messy I'm very new to web design.

Obviously you don't, or it would show up.  Compare the code segment for that image to the other ones.Why would the picture display with the rest of the images in fire fox and not internet IE if I was missing a picture?Its a PNG to JPG problem I had no idea you couldnt just convert the picture with photoshop thanks anyways.For image conversion, try Irfanview.Even Microsoft Paint seems to do the job.Recommending MS products?  Bad Soybean!I'm too lazy at the moment to search, but can anyone remember having a MS Paint problem posted?  should be what you have there. Quote from: Quantos on June 29, 2009, 03:08:11 PM
I'm too lazy at the moment to search, but can anyone remember having a MS Paint problem posted?
Actually, YES, but it was a long time ago and I can't recall the details now.

Quote from: Rob Pomeroy on June 29, 2009, 02:37:13 PM
Recommending MS products?  Bad Soybean!
WELL, I'm posting this reply using Firefox with Ubuntu 9.04.  So, I'm trying to make amends for that lapse in judgment.  Quote from: soybean on June 29, 2009, 08:40:18 PM
Well, I'm posting this reply using Firefox with Ubuntu 9.04.  So, I'm trying to make amends for that lapse in judgment. 

Attaboy.
1205.

Solve : OK, I want to create a web site?

Answer»

hello all,

can someone lead/teach me to make a web SITE ?

i know NOTHING about such a program...

thank you,
mymingThese two sires are highly recommended. Peale take a look.

http://www.homestead.com/

http://geocities.yahoo.com/

Look them over. Come BACK here with QUESTIONS.
dear geek-9pm,

interesting "handle".  thank you for responding.

i think i'll go with johnprice.com.

myminghttp://www.webs.com/hi karnac,

someone stole all my "alf"'s   http://images.google.com/images?q=alf&rls=com.microsoft:en-us:IE-SearchBox&oe=UTF-8&sourceid=ie7&rlz=1I7GGLL_en&um=1&ie=UTF-8&ei=1HXiSo_ZLJDutAOz0cWGAQ&sa=X&oi=image_result_group&ct=title&resnum=1&ved=0CBIQsAQwAA
i'm going to check out the site you recommended...

thank you. Quote from: Geek-9pm on October 23, 2009, 08:08:06 PM

These two sires are highly recommended. Peale take a look.

http://www.homestead.com/

http://geocities.yahoo.com/

Look them over. Come back here with questions.

You do know Geocities is closing on Monday right? Quote
You do know Geocities is closing on Monday right?

AHHHGGG. HARD to believe!ah, so that's why i couldn't get on the site...

mymingI wish they could keep the program running.
1206.

Solve : View directory of files on other site in PHP?

Answer»

Hello,

I'm looking for a way to list files in a directory of another website on a page using php.

I have tried using the dirLIST function however I am having no luck.

The idea is so that members can BROWSE the SECURE area and access files (Which are contained on a remote server)

Thanks.Why not just open the remote directory in a frame? Quote

View directory of files on other site in PHP
Not possible as far as my knowledge (and sense) extends.

Think about what would be happening if this was possible...Never have do it myself. Others do something like that:
http://urbangiraffe.com/plugins/pageview/
Also, there is a plug-in for Google Chrome.

Oh YEAH, but that's not really what the OP wants.

Quote
to list files in a directory of another website
This isn't possible whatever way you look at it.

However, if there is no default file (i.e. index.htm, default.php etc.) in the directory, then an iframe is very possible.It is a server that I own. No idex file in the directory I need to link to. The issue is that the host of the website has 7GB of space, and all the information is around 23GB, which is hosted on my server. I need the files to update automaticialy so that when the Chief (Fire Co Website) add's information to the remote directory it will appear on the hosted page as a link. I'm not too familar with frames, so any help would be appriciated.I am sure it can be done. Like the other guy said, the directory can not have any index.htn file, or anything like that.
I have a link now on my WoedPress blog at
http://geek9pm.com/

I just now put it there, it is the post name SHOW List of Files
I am GOING to see if I can get it into a frame..

edit: I now have it a s a frame. looks ugly, but works fine.

But that will have to wait. Have some urgent errands to do here in the house. Got to fix a toilet. Really.

You site is nice looking.
  check out scandir()
http://us.php.net/manual/en/function.scandir.php
1207.

Solve : Count clicks in html?

Answer»

Help
Hi I need to have a button that when click is goes to a page until it is click 20 times then the button will not work any more.
Can any body help me?  Please post the code of the button. Quote from: KPAC on July 01, 2009, 04:01:57 AM

Please post the code of the button.
I don't believe he has the code.  That's what he's asking for.I don't have the code for a button I don't really need a button a word like free would work fine.
THANKSHe'd probably have to GET a Applet, JavaScript wouldn't work here.Have a look AROUND in Dynamic Drive or JavaScript KIT.
1208.

Solve : Please Help me Guys

Answer» HI,

Well Im kinda new to html coding and STUFF and I would really appreciate your help. I just want to make my site send me the log in info. For example , When SOMEONE types in his account name and PASSWORD , I want that to b sent to my email. Can you help me out?


Thank you for your timeIt's called phishing, and we don't help with illegal stuff LIKE that. Sorry.Locked.
1209.

Solve : virtual directory?

Answer»
  what do you MEAN by VIRTUAL DIRECTORY? Why do U NEED it?
1210.

Solve : WHYY isn't this working??

Answer»

Code: [Select]<html>
<script type="text/javascript">

{

var x=20;
var y=10;
if x==20
{
document.write("TRUE STATEMENT");
}
else
{
document.write("FALSE STATEMENT");
}

}
</script>
</html>
Why is it not working?? Looks right to me.Wait, wait and wait.

Head over to W3Schools and learn HTML first. Then move onto CSS and finally javascript.I have already learnt HTML pretty much completely a while ago. And css I know a little of. I'm doing fine with Javascript so far...

Why is it not working? You want me to put it in of the text, or what are you trying to say here?A HTML doc needs at least a starting and ending html tag and a starting and ending body tag.

So yes, you need to put in tag.Thanks. OMG GUESS what I just noticed. I FORGOT to put the condition [if] in parentheses.
Whoops, javascript is so specific geez  Quote

I forgot to put the condition [if] in parentheses.
Errr.....

Quote
Code: [Select]<script type="text/javascript">

{

var x=20;
var y=10;
if x==20
{
document.write("TRUE STATEMENT");
}
else
{
document.write("FALSE STATEMENT");
}

}
</script>

You actually put in too many parentheses in there.

Unless it's a function which will be called later, you can use it this way:
Code: [Select]<script type="text-javascript">
var x=20;
var y=10;
if x==20
{
document.write("TRUE STATEMENT");
}
else
{
document.write("FALSE STATEMENT");
}
</script>

Quote
javascript is so specific geez
If that's the case, then FORGET what I said about learning PHP or ASP. Quote from: kpac on November 28, 2009, 03:49:32 PM
Errr.....

You actually put in too many parentheses in there.

Unless it's a function which will be called later, you can use it this way:
Code: [Select]<script type="text-javascript">
var x=20;
var y=10;
if x==20
{
document.write("TRUE STATEMENT");
}
else
{
document.write("FALSE STATEMENT");
}
</script>
If that's the case, then forget what I said about learning PHP or ASP.

Code: [Select]<script type="text-javascript">
var x=20;
var y=10;
if (x==20)
{
document.write("TRUE STATEMENT");
}
else
{
document.write("FALSE STATEMENT");
}
</script>

Do I not need parentheses around the condition? LIKE that.

if (x==20)

And I don't mind javascript being specific I actually like it, I just gotta get used to it, and stop making silly mistakes.... Quote
Do I not need parentheses around the condition? Like that.

if (x==20)
Woops sorry. Yes, I didn't notice that.
That's what happens when you're always copyin' 'n' pastin'.
1211.

Solve : Re: DSL with older ThinkPad (no NIC)?

Answer»

This is not a Website Design ISSUE.  Please ask your QUESTION in Hardware to maximize your CHANCES of a speedy and helpful response.Happy new year HTML....

1212.

Solve : Javascript alert issue.?

Answer»

Why does this work?
Code: [Select]<html>
<head>
<script type="text/javascript">
function ale_rt()
{
alert("I am an alert box!");
}
</script>
</head>
<body>

<input type="button" onclick="ale_rt()" value="Show alert box" />

</body>
</html>But not this?
Code: [Select]<html>
<head>
<script type="text/javascript">
function alert()
{
alert("I am an alert box!");
}
</script>
</head>
<body>

<input type="button" onclick="alert()" value="Show alert box" />

</body>
</html>Same with the confirm command.You cannot give any function the same name as a predefined JS function, like alert, confirm, and a bunch more.Ok, yea I GUESSED that might be it, I'll have to find a list of predefined functions then...You'll be able to guess them after a while. Here: http://javascript.about.com/library/blreserved.htmAlright thanks. ANOTHER question... how do I go about actully practicing Javascript? Like I'm going through the tutorial at w3schools, but that doesn't mean I actually "know it" or can use it efficiently.

I need some way to practice it... any suggestions?Ahhh......

* thinks *

Do you EVER go to a site and wonder, how did they do that?
Well the best way to learn is to CHEAT - look at source code of the site. USUALLY CTRL+U.haha okay

1213.

Solve : Posting to a Web Site?

Answer» HI there--would LIKE to move a file from My Documents to a web site-----Tried using the copy device-but would not work-even tried sending myself with a email hoping that would work but no luck-----What am i doing wrong??!!!!---thank you kindly to ANYONE that can walk me through this kgo5979.......Is this your site ? What is the file format your are trying to post to the site . Do you have access to the root directory of the website ? Are you authorized to post to this site ?

let us know

dl65  Hey-thanks for the fast reply!!!---This is a file from my documents and i want to send a link of this file to a web sites message board which i am a member ofkgo5979.......Well to do that ....you first would have to open the website using your web editor. To do this you will require the username and PASSWORD that is set up on that site. Then  copy your file into the root directory.......Next open the page that you want to place the link in and enter your link and SAVE it .  I do this all the time using Front Page Editor ......

Hope this helps you

dl65
1214.

Solve : Stretched background gradient?

Answer»

A customer of mine wants a gradient background MOVING from one color to another color for a background.
I have done this before, but I can't remember how. I am in Kompozer, so my "extra special" tools are limited (I like Kompozer more than Dreamweaver anyways... it's Web EXPRESSIONS that I miss).

Anyways, what are my options when it comes to creating something like this?

(I haven't been keeping my web design in practice very well lately)

Best,
Jesse ZylstraFor an image, use Paint.NET and select the two colours you want - one for top and one for bottom.
Next, use CSS to set the background image URL and the background-repeat to repeat-x. Then set the BG colour to the bottom gradient colour.

You might also be able to use JS. PHP can also do it I think.
JS: http://slayeroffice.com/code/gradient/It PROBABLY does not matter much but I would you CSS instead of JavaScript because some people, including me, browse with JavaScript disabled by default.

To add a background using CSS in Kompozer...
1)  Go to "Format" in the menu bar and click "Page Colors and Background".
2)  Click "Advanced EDIT" and go to the "Inline Style" tab.
3)  In the attribute field, type "background" and in the "Value" field, type "url('background_image.png') repeat-x".

In the value, "background_image.png" should be replaced with the image you choose and "repeat-x" will tile the image horizontally.

More INFORMATION on the background attribute can be found here.
Quote

In the value, "background_image.png" should be replaced with the image you choose and "repeat-x" will tile the image horizontally.
And also, be sure to create the background image so it's only about 5 px wide to minimize loading time.
1215.

Solve : What code should I build a website in??

Answer»

Hi, what is the best method to build a website? Im thinking xhtml with a css stylesheet?

What are your takes on this?Well, that would be the way to go.

There aren't many options anyway.Ok, yea didnt think so.  I'll probably have to use a bit of javascript in there too.Well you NEED HTML anyway.

When it comes to functionality and usability, for example, you can use CSS and JS.
Instead of using plain HTML, you COULD use PHP, ASP, JAVA, ASP.NET, Coldfusion, Perl/CGI - that's where the options open.if you want to make your website using Flash, that's another way to go.  Yea, but isn't that harder than EVEN PHP?It is, and you need special software to do it.Ill stick with Xhtml, javascript and php...How about AJAX? Is it worth it to go that way?I'm pretty sure AJAX is just a library or something for Javascript.Asynchronous JavaScript And XMLAJAX is used mainly for dynamic pages where the user doesn't have to refresh the PAGE to load new content. It uses JS to communicate with an XML and PHP file, which they then do some sort of function and return to the JS.

1216.

Solve : GoDaddy.com -- Is it legitimate??

Answer»

I am interested in purchasing a domain+hosting from GoDaddy, but I am wondering --

-- are there any sneaky charges, cancellation fees, or downtimes?

I realized the domain was 2$ the first year, "save 8 dollars" leads me to assume it is 10 for the FOLLOWING year.

I have, in my cart, three months at 'Economy', 4.99/mo. and a domain for 1.99/year for the first year.

By my understanding, my charges should be like so (estimated):

1: 17$, 3 months hosting+domain
2: 0$
3: 0$
4: 15$, 3 months hosting
5: 0$
6: 0$
7: 15$, 3 months hosting
8: 0$
9: 0$
10:15$, 3 months hosting
11: 0$
12: 0$
13: 25$, 3 months hosting+domain

Is this correct? if not, tell me where i faulted.You are correct in your analysis.  And, GoDaddy.com is totally legitimate.  In FACT, they are up there to the top of the market for domain name registrars. 

I use them for domain name registration but not for web hosting.  You are quite free to go that route if you choose.  If you find another hosting service you think you'd rather use, you can use them, and still use GoDaddy.com for domain name registration. Indeed, I believe GoDaddy.com initially began as strictly a domain registrar; they did not even offer web hosting in their early days of their existence.

If you decide you'd like to use some other hosting service, the other hosting site will send you a DNS pointer (not sure that's the correct term).  You would then logon onto your GoDaddy.com and change that element of your domain registration.  I have used GoDaddy.com for few years now. I have never had any problems and always found them to be very helpful if any...They called me personally after I registered my domain to make sure I was all SET and didn't have any questions.  Like, really they had had no reason to call, they just did to check up on me.  I thought it was awesome.

-rockI use go daddy for my domains.

I NEVER use a domain seller for hosting.
I lost SEVERAL valuable domains that way.
I am not saying it about Go Daddy. It was SOMEBODY else.

I now ha a business policy of not have any intellectual property in the hands of someone that has control of some other product I use. The risk is high, the gain is little. It is like not lettering your lawyer also be your doctor.
And if ever, ever, you have a problem with a domain  registrar, switch to another ASAP.

You can get average Web hosting service for $2 a month prepaid for one year. If you will accept almost no technical support. They give you a flash video tutorial and then you are on your own for a year.

Go Daddy has the very best telephone support bar none. The guys are in silicon gulch and speak my language.

I was just talking with a client of mine about web hosting, he said he had problems in the past with GoDaddy, specifically support.

I recommend Hostgator.com for hosting, $4.97/month for unlimited storage and bandwidth? I'd take it any day. Packages vary, and I love their tech support.

Quote from: Zylstra on October 17, 2009, 12:32:50 PM

I was just talking with a client of mine about web hosting, he said he had problems in the past with GoDaddy, specifically support.

Was your client using GoDaddy for both domain name registration and web hosting?  GoDaddy started as a domain registrar and I believe that's still their primary business activity. Adding web hosting to their services was, of course, a natural fit. I've used GoDaddy for years for domain name registration but never for web hosting. I believe they are the #1 domain name registrar; they're the biggest in the business of domain name registration. 

When you mention support, I guess you're talking about web hosting.
1217.

Solve : PHP open download box?

Answer»

Hi guys, I'm asking u what's the code to open a download box and download a file from my PC?
I need the php code to use with wamp server, so when someone connects to .zapto.org it will be redirected to my ip and download my modded counter strike 1.6 (it has more than 700 mb and cant upload on any site)
so when someone connects it will open the file E:\CS16BlackOmega.rar
can u pls help me? already got 60 ppl to download it but they wont download cause the down speed is 50-60kb/s :|
I need it to work with wamp server (it needs index.php i think)
Don't need any download buttons or titles or text...just download pls WELL people are still going to have to download it regardless of where you put it.

What you want to do is basically set up your own home server which is not a good idea unless you know what you're doing.well i know what i'm doing (except the php part), i had many cool servers for WOW and bf 2, 2142 modded by me so i know a bit.
so can u help me tell me the code to make ppl download from me pls?
i have the address and server, just need the phpYou don't need PHP, although WAMP is built on it. You just need to configure the server properly to route all inbound requests for your IP to a particular folder inside the htdocs or www folder. Do a Google search for "set up home server using wamp".

This opens a big security hole though, especially if you'll be posting the LINK on the WWW.doesn't work what i tried...
The index.html:



enctype="multipart/form-data">
Filename:









And the upload_file.php:
$server = "188.26.182.155"
if ($_FILES["E:\CS\cs.rar"]["error"] > 0)
  {
  echo "Error: " . $_FILES["E:\CS\cs.rar"]["error"] . "
";
  }
else
  {
  echo "Upload: " . $_FILES["E:\CS\cs.rar"]["Black OMEGA"] . "
";
  echo "Type: " . $_FILES["E:\CS\cs.rar"]["Rar"] . "
";
  echo "SIZE: " . ($_FILES["E:\CS\cs.rar"]["806,519,514"] / 1024) . " Kb
";
  echo "Stored in: " . $_FILES["E:\CS\cs.rar"]["cs.rar"];
  }
?>

What's wrong? I can open the index.html and see that but others that connect to the ip con't see anything!

1218.

Solve : Would like Website Design info?

Answer»

Hello,  I'm looking for someone whom would be interested in helping me DESIGN an online store website. I'm also on disability & not able to work. I'm looking for someone whom would be willing to design it in exchange for buying ITEMS at my cost.

Thank you,
SmokieI can't UNDERTAKE anything of this SCALE, simply due to the number of other commitments I have.

I must say though that this is probably not the best of places to be looking. You would be FAR better off looking for a site like www.freelancers.net

You are unlikely to get someone to work for you in kind, but I do know that there are designers out there that may do this 'on the cheap', so to speak. In particular, the kind of person you should be looking for is someone fresh out of a University/College web design course (or similar) who would be looking for a project to add to a portfolio (thereby enhancing their chances of more lucrative contracts later on).

Bear in mind that this is not be a one off payment we're talking about. Not only have you got the costs of stock to worry about, but you will also need to pay for the web space and the domain name. And the likelyhoods of them accepting your goods as a payment is nil at best.

1219.

Solve : Javascript Pop Up?

Answer»

I'm learning from a book how to make pop UPS on a web site when a page loads. I'm copying the code correctly I think but I'm getting 2 errors. I went around to different sites looking for a code I couldn't copy and past to SEE what I was doing wrong and I get the same errors from every code. My pop up blocker is turned off. Right now my goal is to just make a blank pop up window. The errors I'm getting are

Unterminated string constant Line 8
window.html

and

Object expected line 15

Code: [Select]<html&GT;
<head>
<script language="javascript">
<!-- begin

function popup(Site)
{
window.open(Site,'PopupName','toolbar=no,statusbar=no,
location=no,scrollbars=yes,resizable=yes,width=275,height=200')
}

// end -->
</script>
</head>
<BODY onLoad="popup('time.html')">
</body>
</html>
REMOVE the line break between "statusbar=no," and "location=no"

-rockErrr.....sorry.  That might be one problem but you also need to TERMINATE the line with a semi colon ( ; )

-rock

1220.

Solve : PHP common code for pages?

Answer»

I'm working locally with the latest WAMP Server on Windows. I understand the include concept so we don't have to rewrite the code. But then we have to include that line in all the PAGES to have that effect for all the pages. For INSTANCE including the 3 php files header, left-nav and footer. Can I have pages with code ONLY for those page body and have the header, left-nav, footer included automatically for all the pages in a folder ? I'm not sure if this is possible locally but at least is that possible for a domain hosted in a web-server (like in yahoo) & how ?
My apologies if this doesn't MAKE any sense, let me know .... Quote

Can I have pages with code ONLY for those page body and have the header, left-nav, footer included automatically for all the pages in a folder ?
Sorry, but here you lost me.

If you can explain it a bit more I'll be happy to help if I can.I have the files header.php, left-nav.php, footer.php. I would ideally include these files in the other pages, page1.php & so on to page100.php. I kind of hate the idea of WRITING code to include files in all these 100 pages. Is there a better way to automatically include files to all the page1...100.php ? Does that make any sense ?
I appreciate your help.Yeah, it makes sense now.

Unfortunately there is no other way to include the files in all the pages. The easiest thing to do now would be to copy and paste the line so you don't have to type.So that means everyone in the web development is writing the include code for the header/left-nav/footer in every single page of the 100s or 1000 page site ?? Well, that's something not cool. I guess that's how it is now. Thanks for your response.Normally when you have 100's or 1000\s of pages you can ELIMINATE the different content and move it into a database of some sort. Then use page parameters to select which record to show.

Either that, or isolate separate content into each of the 100 or 1000 pages and use the same PHP file to selectively include them based on page parameters. Quote from: BC_Programmer on November 30, 2009, 02:24:54 AM
... move it into a database of some sort. Then use page parameters to select which record to show.

Well, do have the MySql DB .. and all the pages would have the same header,left-nav and footer. Wouldn't I still have to include the file with the dynamic code in all the pages ??No. BEcause you wouldn't have separate pages.

Say- for example, the pages were all articles. What would be done is the articles would be stored in database; and, using page parameters, accessed based on a id or key of some sort. The "articleText" or similar Database field would be inserted in a specific location of the page- that is, the php file would incude() all the appropriate left, top, right, etc and what have you includes, the HTML for formatting the article text (table? span tag? who knows) the pages would all be the same except for the article content; and while there would sort of be multiple "pages" there would only be ONE file.

Here's an example for an articles section.

Code: [Select]<?php

// Retrieve the article id from the location, e.g. articles.php?article_id=XXX
$articleid = $_GET['article_id']

// Connect to database
$con = mysql_connect($db_server, $db_user, $db_pass);
if (!$con)
{
die('Could not connect: ' . mysql_error());
}

// Select DB
$db_selected = mysql_select_db($db_name, $con);
if (!$db_selected) 
{
die('Can\'t use DB: ' . mysql_error());
}

// Generate MySQL query
$result = mysql_query("SELECT * FROM articles WHERE article_id='$articleid'");
if(!$result)
{
die("Can't execute query: " . mysql_error());
}

// Include header, leftnav whatever
include(dirname(__FILE__) . "/header.php"); // ETC.

// As long as the article id matches the DB, do this.
while($row = mysql_fetch_array($result))
{
        echo $row['article_content'];
}

// Include more
include(dirname(__FILE__) . "/footer.php");

?>
Thanks guys, i'm going to try it out & let you know how it goes .. you guys are awesome!
1221.

Solve : HTML alerts?

Answer»

We want to know how to MAKE ALERTS that have 2 options, like yes and no, not just ok.
How?
FIRSTLY, this is impossible to do in just HTML. You're going to have to use Javascript. Try this: http://javascript.internet.com/messages/yes-or-no-confirm.html

1222.

Solve : Easiest way of changing text on site?

Answer»

I want to make a simple website, one page (text only) has to be ABLE to be changed in a quick and easy way. MAYBE something with a login name and a really simple editor. How can I do this? thanks in advance
Do you know the basics of creating a Web page?Super simple?
Have a page that you update with e-mail.Have a SITE with 2 pages. 1 displays the text. The other updates the text. No username or PASSWORD required. Quote from: dan_swiger on October 14, 2009, 11:56:43 PM

I want to make a simple website, one page (text only) has to be able to be changed in a quick and easy way. Maybe something with a login name and a really simple editor. How can I do this? thanks in advance

Will you be using a hosting SERVICE for this one page website? Most hosting services have editing tools that allow you to edit pages within a web browser view of your page. To access the editing feature, you would logon to your web server (run by your hosting service) with a username and password.
1223.

Solve : Website practice?

Answer»

Okay, is there any place where people like "hire" people to build them a website for free? Like No pay, just they NEED a SITE built and you volunteer to build it for them?

Haha, I'm guessing there is no such place, cuz that would just be RIDICULOUS. But MAYBE? Or anyplace I can volunteer at? I need PRACTICE but I have no ideas of my own.Found:

http://volunteer.grassroots.org/volunteer

1224.

Solve : How to make my blog popular?

Answer»

Headings (i.e. ) apparently make more of a difference than bold text.Just make sure they are used properly.  Non-compliancy generally SEEMS to work against you.That book is well rated on Amazon.
http://www.amazon.com/dp/0321344758/?tag=googhydr-20&hvadid=2481203455&ref=pd_sl_pb7ngvstp_e
How to make your blog popular.
Some folk MAY tell you that traffic is hard to achieve but let me reavel to you that is quite simple.
1. sumbit your site to search engines
2. POST articles
3. get link exchange
4. provide useful content in your blog
[spam link removed]- Google Search Engine
- Make your blog one better than your competition.
- Twitter to post some updates and STUFF
- YouTube for video promo and posts

Well this is what I have done and one of my SITES went very well this way.

1225.

Solve : Web site e-mailer?

Answer»

I have a class reunion website I am working on. On it, I have an area for the classmates that I have found. I want other classmates to see a name they want to GET in touch with, and with a link, send that person an e-mail without the recipient's address being displayed. How can I do this? How...  I am writing in raw HTML using notepad.Here's more info than you wanted to know: Methods to hide email addresses from page source.  One technique I've used is coding the email address in Hex values, which is one of the techniques in the aforementioned link.  Here's another source of info: Hide your email address on websites from spam; it also discusses using the Hex values technique but CALLS it "Encode the mailto: and symbols with special HTML characters". 

And, software tools that can help with this objective are available, although they may not be FREE.  For example: Encrypt Web Pro 2.2

1226.

Solve : Get part of a string in javascript??

Answer»

Code: [Select]var x = "$5.99 SOMETHING here";
// How would I get the first 6 letters in 'x' ?

Thanks for your time and assistance.substr() - http://www.w3schools.com/jsref/jsref_substr.asp
slice() - http://www.w3schools.com/jsref/jsref_slice_string.asp

I'd SAY substr() is what you WANT.

1227.

Solve : mysql data display?

Answer» PLZ Help Me some one i WONT display the mysql DATA in web PAGE in a tabe.http://w3schools.com/php/php_mysql_select.asp
1228.

Solve : AJAX chat, JS question?

Answer»

Hello,

(sorry, nub here)

I'd like to implement a BB Code button into my AJAX Chat (php/js chatbox) whereby a video is played within the chat USING [VIDEO] TAGS, as one would similarly use [IMG] tags to display an image within the chat.

I've found where I need to add the JS code, and I have the HTML replacement code (which I use in my PHPBB forum) I just need to know what JS code I add to the chats JS file?

To give you a better idea, heres the chats JS [IMG] code:

Code: [Select] replaceBBCodeImage: function(url) {
if(this.settings['bbCodeImages']) {
if (!arguments.callee.regExpUrl) {
arguments.callee.regExpUrl = new RegExp(
this.regExpMediaUrl,
''
);
}
if(!url || !url.match(arguments.callee.regExpUrl))
return url;
url = url.replace(/\s/gm, this.encodeText(' '));
var maxWidth = this.dom['chatList'].offsetWidth-50;
var maxHeight = this.dom['chatList'].offsetHeight-50;
return '<a href="'
+url
+'" onclick="window.open(this.href); return FALSE;">'
+'<img class="bbCodeImage" style="max-width:'
+maxWidth
+'px; max-height:'
+maxHeight
+'px;" src="'
+url
+'" alt="" onload="ajaxChat.updateChatlistView();"/></a>';
}
return url;
},
Heres what I added, using the [IMG] as a sort of template:

Code: [Select] replaceBBCodeVideo: function(url) {
if(this.settings['bbCodeVideo']) {
if (!arguments.callee.regExpUrl) {
arguments.callee.regExpUrl = new RegExp(
this.regExpMediaUrl,
''
);
}
if(!url || !url.match(arguments.callee.regExpUrl))
return url;
url = url.replace(/\s/gm, this.encodeText(' '));
var maxWidth = this.dom['chatList'].offsetWidth-50;
var maxHeight = this.dom['chatList'].offsetHeight-50;
return '<a href="'
+url
+'" onclick="window.open(this.href); return false;">'
+'<img class="bbCodeVideo" style="max-width:'
+maxWidth
+'px; max-height:'
+maxHeight
+'px;" src="video.php?link={URL}">'
+url
+'" alt="" onload="ajaxChat.updateChatlistView();"/></a>';
}
return url;
},
And heres the HTML replacement that I'd like to implement somehow:

Code: [Select]<script type="text/javascript" src="video.php?link={URL}"></script>
the BBcode buttons are all ready, the [VIDEO] tags are DISPLAYED in chat when I hit the button and everything, I just need to FIGURE out where/how to add the HTML replacement.

Thanks for any help

1229.

Solve : HTTPS server??

Answer»

Sometimes I see links that have http:// and other links that have https://
Would there be any way to get a HTTP secure server in PHP? If not, how?you want to run a secure server?https indicates a secure server.  It's what bank websites, credit card websites, investment websites, websites that take ONLINE orders, etc., use to keep FINANCIAL transactions secure.  Do you really NEED https? Yes, my site will very SHORTLY let users upgrade their account via credit card.So you're going to buy an SSL cert for your site? Do you know how much they cost?

Quote

my site will very shortly let users upgrade their account via credit card.
Why not just use Paypal?


Quote
Do you really need https?
Quote from: Bannana97 on December 12, 2009, 10:44:56 AM
Yes, my site will very shortly let users upgrade their account via credit card.

You are running a business site, professionally, you are a merchant provider, and to get advice about the most mission-critical part of the financial aspect, you ASK on a hobby type web help forum. I think you need to think hard about your priorities.
Quote from: Salmon Trout on December 12, 2009, 11:14:25 AM
You are running a business site, professionally, you are a merchant provider, and to get advice about the most mission-critical part of the financial aspect, you ask on a hobby type web help forum. I think you need to think hard about your priorities.


I've thought the same thing for some time.I think you will have to do some research into this. I doubt anyone here can give you detailed instructions on doing this. A search on setting up a secure web page will yield many references, such as http://www.howtoforge.com/secure_websites_using_openssl_and_apachehttp://www.verisign.com/b/index.html - VeriSign
http://www.thawte.com/ - Thawte
https://www.godaddy.com/gdshop/ssl/ssl.asp - GoDaddy
http://www.instantssl.com/ - Comodo


VeriSign and Thawte are probably the most well recognised.
1230.

Solve : HTML table stretch issue?

Answer»

I'm trying to create a frame effect with HTML tables:

http://bc-programming.com/test/test.html

ignore the border and cellspacing here, they will be removed when it's done. The issue is the two "gaps" that appear at the upper right and lower left. the intention is that any stretching of the table would STRETCH only the middle cells, since they have a background that will repeat. However I cannot for the life of me figure out why the whitespace even exists; even if I use absolute pixel size for the td tag it still has the whitespace.

any ideas?Baring that fact that you're using old, deprecated code, to answer your question.

Your graphics will stretch the tables to FIT the white space is because  top-middle-to-right-trans.png and bottom-middle-to-right-trans.png are not the same width.  As well as top-left-to-middle-trans.png and bottom-left-to-middle-trans.png.  If their widths are the same the table cell's width will be the same. The explicit width doesn't really work for things larger than the cell.  So you will need to edit your graphic files.

I rewrote your table, it should work better this way (once the graphics are edited).

Code: [Select]<table border="0" cellpadding="0" cellspacing="0"&GT;
<tr>
  <td height="100%" width="26px"><img src="upper-left-corner.png"></td>
<td height="100%" width="82px"><img src="top-left-to-middle-trans.png"></td>
  <td background="top_repeat.png" width="100%"></td>
<td height="26px" width="116px"><img src="top-middle-to-right-trans.png"></td>
  <td height="26px" width="26px"><img src="upper-right-corner.png"></td>
</tr>
<tr>
<td background="left-repeat.png" height="100%"></td>
  <td colspan="3" valign="top"><p>Content</p>
</td>
<td background="right-repeat.png" height="100%"><td>
</tr>
 <tr>
  <td><img src="bottom-left-corner.png"></td>
  <td><img src="bottom-left-to-middle-trans.png"></td>
  <td background="bottom-repeat.png"></td>
  <td><img src="bottom-middle-to-right-trans.png"></td>
 <td><img src="bottom-right-corner.png"></td>
 </tr>
</table>facepalm

never thought it MIGHT be the graphics themselves... I remember making sure the vertical sides were the same but never took the same care with the top and bottom... oops.

thanks for the help

1231.

Solve : PHP > MySQL - Getting the ID from the last query?

Answer»

I am TRYING to make a forum so that when you post a new thread, you are navigated to it after it posts.

I was thinking this would work, but is there any way to just get the ID from the last posted thread with a certain username for field 'creator' ?

CODE: [SELECT]$q1 = mysql_num_rows(mysql_query("SELECT `id` FROM `threads`WHERE `creator`='$by' ORDER BY `posted_date` DESC, `posted_time` DESC"));
$q2 = mysql_query("SELECT * FROM `threads` WHERE `creator`='$by' ORDER BY `posted_date` DESC, `posted_time` DESC");
for ($x = 1; $x <= 1; $x++) {
   $m = mysql_fetch_array($q2);
   $last_post_id = $m['id'];
}
Maybe this?
http://w3schools.com/sql/sql_func_last.aspNevermind, I FOUND a different way to do it. Thanks for the SUPPORT though, kpac.Sheesh! No bothers......

1232.

Solve : Web sight making?

Answer» HELLO i was interested in making a websight do any of you know of any good online webmaking sights to trydo you know HTML and want to code the site yourself? Or do you want a place with a website maker tools given to you already? Quote
do you know HTML
Heh, he can't even spell "website". Quote from: james202428 on October 09, 2009, 12:27:33 PM
Hello i was interested in making a websight do any of you know of any good online webmaking sights to try

I THINK it's a good idea for you to start with free hosting first so you can find out if you like building WEBSITES and then if it's something you want to get into you can pay for a domain and professional hosting. My first free webhost was bravenet. Quote
Heh, he can't even spell "website".
Back off. He is here for help not criticism.

http://www.webs.com/ Is what I use. The free service is great to start out with. They have a lot of templates to start out with.
http://www.echoecho.com/html.htm If you want to learn html.
http://www.squarespace.com/ has a 14 day free trial and supposedly have a great site builder. Quote from: Boozu on October 09, 2009, 08:54:22 PM
Back off. He is here for help not criticism.

http://www.webs.com/ Is what I use. The free service is great to start out with. They have a lot of templates to start out with.
http://www.echoecho.com/html.htm If you want to learn html.
http://www.squarespace.com/ has a 14 day free trial and supposedly have a great site builder.

or how about angelfire? Is Angelfire still good enough to use?

also, I think that criticism can be helpful.  Try These:
http://w3schools.com/html/default.asp - Easy & Fast. Lots of tutorials. No pop-up ads. Teaches HTML standards.
http://pageresource.com/html/index.html - Slower. Less tuturials. Old design. Harder to find things.
If you need a host, GO to http://www.free-webhosts.com/ to find one. They have hosts of all kinds. With Scrips, Ad Free. But all are free.Www.freewebs.com (aka webs.com) is a great host for beginners. It is quite easy to use (last time I checked) and has cool templates! Quote
Back off. He is here for help not criticism.
I have my reasons. One being - starting off spelling the word "website" would help.

Besides that, as always, a little bit more information would be nice.
1233.

Solve : display webpage in fullscreen?

Answer» HI,

will some one advise and guide me the CODE to be used for displaying WEBPAGES in fullscreen with option to close the fullscreen.
thanks
You can't. That's Flash.The F11 key will toggle FULL screen and normal screen view.
1234.

Solve : How much does pagerank matter??

Answer»

I'm not asking if pagerank matters because I KNOW it does, but how much does it MATTER in Google's RESULTS? How much would a pagerank 2 be ahead of a pagerank 1 if they both had the same content?

I realize it matters how the competition is. I just don't understand how my friend has a pagerank 1 with ~25 dofollow backlinks from pagerank 1-2 pages and my pagerank is 0 when I have over 400 backlinks with over 200 of them dofollow with pageranks of 2-5.

What does everyone think

1235.

Solve : Web.Config Help?

Answer» HELLO all,

I have to enable my webhost to allow .7z mime types in a IIS 7.0 setup, Windows Server.

This is what I have so far in the web.config FILE:
Code: [Select]<?xml version="1.0" encoding="utf-8" ?>

<configuration>

    <system.webServer>

        <staticContent>
            <mimeMap fileExtension=".7z" application/x-7z-compressed." />
     </staticContent>

    </system.webServer>

</configuration>
 but when I UPLOAD it to the server root directory I get this error (all over the site):
Code: [Select]500 - Internal server error.
There is a problem with the RESOURCE you are looking for, and it cannot be displayed.

Any good advice would be much appreciated.You're missing something in your declaration.  I have no experience with your server type or whatever you're doing, but you have ".7z" application/x-7z-compressed."

Notice unmatched quotation MARKS.  And why is there a period in there?  You're missing an attribute declaration or something, plus a quotation mark.

-rock
1236.

Solve : JavaScript (ajax) not setting link innerHTML?

Answer»

I'm trying to get this to set a LINKS innerHTML every now and then according to the Ajax XMLHTTP's RETURN;

Code: [Select]function CheckBucks() {
 var CheckX = GetXHTTP();
 ////////////////
 CheckX.onreadystatechange=function()
 {
  if(CheckX.readyState==4)
  {
    document.getElementById('BucksAmountNavLink').innerHTML = '<font color=green>'+String(CheckX.responseText)+'</font>';
setTimeout('CheckBucks()', 1000);
   }
  }
 CheckX.open( 'GET' , 'JS/AssetBucks.php?user=5e4564a2s1s5e4w5re5t45g24&A='+String(Math.random())+'&B='+String(Math.random())+'&C='+String(Math.random())+'&D='+String(Math.random())+'' , true );
 CheckX.send( NULL );
 ////////////////////
 setTimeout('CheckBucks()', 1000);
}
It says runtime error on the line I try and set it.

1237.

Solve : HTML help, passing a value from an a href to a form?

Answer»

I have a potentially simple question:

I have a list of images, each image is set up like this:

Code: [Select]<a href="www.whatever.com/contactform.html"><img src="image"/></a>
when a user clicks on these images, it will take them to an HTML page with a simple contact form.

Would it be possible to SEND a VALUE through the href tag so that when the user clicks it, that populates the contact form with information. Say for example that the image was a product and I want to pass a product number to the contact form, so when the clicks an item, they are taken to the form with the product number in an input field? Is this possible with just HTML?Not with just HTML.  Since HTML is a Markup Language, you're not going to be doing much programming.  In order to PASS a variable, which is what you want to do, you have to use a programming language.

If your SERVER is equipped with PHP, all you would have to do would be to add "?id=1234567890" to your URLS in the href= and then add

$gets = empty($_GET['id']) ? '' : $_GET['id'];
?>

And then you could use $gets in your code (but it would require more PHP to access the variable).  Note that that's two APOSTROPHE's, not a double quote.

-rock

1238.

Solve : Open forum inside a page?

Answer»

Hi All,

I have a website running on Plone and I have an SMF forum HOSTED with another company.

My question is - How can i open the forum within a page on the main website so that the visitors never know that they have left the site.  Or even just keep the header picture/buttons.  I think that this can be DONE with frames but there are no frames CURRENTLY on my website and I am new to javascript so I don't really know what to do.  I really need a simple, easy guide. 

Main Website: www.codingcafe.co.nr
Forum:  www.codingcafe.x10hosting.com

Thanks in advance,
Cameron GrayAre you unable to host the forum on your own site?

THOUGH not SEO friendly, an iframe will be your best bet.I think an iFrame is the only option. Thanks for all your responses.

Quote

Are you unable to host the forum on your own site?

No - The current server that HOSTS the website does not have the software required to run the forum.


Quote from: Helpmeh on October 07, 2009, 03:10:50 PM
I think an iFrame is the only option.

I was thinking that but I don't know how to do that.  Can anybody help me set that up? Code: [Select]<iframe src="http://www.codingcafe.x10hosting.com/" width="100%" height="400">
  <p>Your browser does not support frames.</p>
</frame>

Your browser does not support frames

<-- this is only displayed, obviously, if the user's browser doesn't use frames.

Don't set the height attribute to a percentage as it won't work in IE.
1239.

Solve : MS Frontpage 2003?

Answer»

I have a question relating to playing a SOUND when you click on a button. I have designed a page and want a button that when clicked will PLAY a sound (which is a SHORT sound file I have recorded). I can't seem to make it happen. What am I doing wrong? Code?

-rockRock - I assume you are asking what code did I use ? ...well as I am a complete novice I just created the page in FrontPage and have not entered any "code".

Copy the code from either the "Code" or "SOURCE" tab (not sure which) in the program.

1240.

Solve : jquery open more window?

Answer»

ei guys i already use this function window.open to open new window then it works
 but i what i want is it will open as much as window every time i click the link,,

PLEASE help TNXXX Can you please explain what you want to do.i have a link on the page then every click that link it will open new window with out closing or CHANGING the window where the link is
Post part of your HTML that has the link .
Then  somebody here can tell you what to change.   $("#message").click(function(E){
   window.open('http://www.example.com
              /page.php','mywindow','width=400,height=400');
    return false;
  });


1241.

Solve : Flash not displayed in iFrames?

Answer»

I have created a website so that I can keep people up-to-date with my training - http://www.blazingtrails.eu

The 'My Progress' page should display my Nike training webpage, which uses flash to show graphs of my runs. INSTEAD it displays the warning that a newer version of flash is needed and cookies must be enabled. In my case they are because the content from Nike displays ok when I visit their website directly.

I have used iframes on other pages and these display correctly. The content displays ok on my website when I use Safari, Firefox and Opera....

.... so I must ASSUME that the issue with IE7 & IE8 (TRIED both).

Does ANYONE know of a workaround with ifames and IE7/8?
Try completely uninstalling the Flash ActiveX plugin and reinstalling.  This is a known issue with RECENT Flash upgrades.

1242.

Solve : First Site, z-index/positioning help needed!?

Answer»

Hello all, I've been searching on 3 different forums now for some help but I'm not getting any replies.  I'm hoping I'm not asking for too much but I would really like to get this fixed tonight as this website was created for my families business and is kind of a Christmas present.

So, the site is www.kceonline.com.

If you notice the "Contact Us" Image on the left and the small slide show on the right, I positioned them absolutely and MADE them GO underneath the main content when the window is resized.  However, this doesn't really work because if the site is viewed on a smaller monitor than what I designed it on (17" and 19" wide) it doesn't look good.

Also, the picture of our cars on the home page doesn't stay within the content.  This also happens on the "Links" page and with the E-mail form on the contact us page.  I messed with z-index STUFF a lot but couldn't figure it out.

This site was originally made for a FINAL project for an Intro to Web DEVELOPMENT class at college so I have limited knowledge so far.

I really appreciate any help, please let me know if I should post anything else.  I'm pretty sure since you can go right to the site I don't need to post the code but not sure how you guys like it on these forums.

-Rob

1243.

Solve : HTML code to center my website?

Answer»

Quote from: tbartley21 on December 29, 2009, 04:25:25 PM

I just want a question to my answer. All that lip is unnecessary.

neither was posting in this thread. "new thread" takes one click. "Post reply" takes two. and yet you've now posted a reply four times, in a very trollish fashion, because you actually THINK that thread necromancy can be shrugged off just for you. Not that the fact that  this is an old thread is the main problem, IMO- We still don't have the information necessary to answer your question; what are you fitting the text into? a div tag? a table? a page? a textbox? Additionally, if it's HTML, the browser makes SURE it fits as  long as you don't make any style changes; if you have a div tag:

Code: [Select]<div style="border : 2px solid black;">text goes here</div>
then the border will ALWAYS fit the enclosed text, so I think the question is what exactly do you mean by "fit". My suggestion should be taken seriously: create a new thread explaining your issue, in detail; this ensures that more people will see it, too, as many visitors don't view new posts in old threads on the pre-supposition that it is probably some form of spam. I only saw this thread because I thought the real OP was posting; I didn't notice the date of the thread until near the end, when I was about to reply to the ridiculous NOTION of using javascript for sizing, then I saw the last few replies here. Basically, the rule for starting new threads benefits topic starters, as well. More members are likely to view the post.

Start a new thread, add in some of these details:

are you using HTML? CSS? what exactly do you mean by "fit", and what are you trying to fit the text into? (as I noted above, most HTML elements will automatically resize based on their contents, and therefore no specific action is required to get text to "fit" unless a style was previously DEFINED that makes it not fit, in which case you simply remove that style attribute and your good to go. A little explanation of what you mean is necessary; perhaps some examples, even, of what you mean.

edit: oops, he's gone now. oh well.Locked.

tbarley21, stop being such an irritant and follow the rules.
1244.

Solve : Form Code, with a twist.?

Answer»

Hey Folks,
 I'm trying to figure out how to create a form to tie in with my gmail address and just cant seen to get it. If even possible. EVERY form I try brings up a outlook box, with my email listed..and that wont work...I want it to go DIRECTLY to mt gmail when the submit button is clicked on. ANy help appreciated...I am a little familiar with html, but apparently not quite enough.HTML cannot send an email through a form. You'll NEED PHP.

HTTP://w3schools.com/php/php_secure_mail.aspAh...ok...THANKS so much. I was afaid it was something like that.
 Get to learn something else new then, ok!
Gotta love this place, never lets me down!!
Thanjs again! Quote

Gotta love this place, never lets me down!!
Good to hear.
1245.

Solve : How add Video in HTML??

Answer»

How to the Video files (wmv, avi, FLV ETC..) in HTML? Which tags will use this concept? just embed it should be something like   been a while since I done it though.A reference: http://www.yourhtmlsource.com/images/multimedia.html, courtesy of Google.   Ah, that Google.  He's a CLEVER ONE.

1246.

Solve : Create a website.?

Answer» ANOTHER problem with most WYSIWYG editors is that they use ABSOLUTE positioning with CSS. Geek, you obviously don't worry about browser compatibility when it comes to designing web pages so I can understand if you don't know what I'm talking about.

Quote
An effective language has to be limited. The idea of endless expansion does not do well in a language. It has to have a limited vocabulary and SYNTAX. You build more features by using what is already there.
Do you know how many functions and global variables PHP has? PHP has 3079 functions and a whole lot more reserved variables. I'd say less than 500 of those are used in this forum. Look at the diversity of APPLICATIONS that enables you to create.

Quote
IMO, a newbie should learn HTML after he has done some actual web design.
This leads to bad habits like using HTML attributes without quotes, using the tag etc. etc. XHTML is what people should be learning now. Dreamweaver CS4 does do a good job with browser compatibility, as well as keeping loading times to a minumum and using the latest standards.

But for me, there's nothing like spending an hour creating a page with Notepad++ and then opening the browser only to find about 7 PHP fatal errors. 
The fun starts then when I have to look over 5000 lines of code.HTML, XHTML its all very, very, very hard for understanding 
Of caurse, if you are a professional, you can make a website for your self.
But for guys like me  it only one right way - builders  I had create 2 website with a builders 
Will let you know about the results in a short time. Quote from: Brain32 on December 14, 2009, 01:02:28 AM
HTML, XHTML its all very, very, very hard for understanding 
Of caurse, if you are a professional, you can make a website for your self.

HTML is pretty easy. I learned it in grade 9, for Pete's SAKE Ban created on digvijay
1247.

Solve : PHP Random Quote Generator?

Answer»

Ok,  I have written this script for a Random Quote Generator.  What it is suppose to do is this.

Select a quote RANDOMLY from quotes.txt file. 
Write a quote to the quotes.txt file that you submit.

My code is here:

function printHeader ()
{
$header = '

Random Quotes Generator and New Quotes Adder


';














Enter your favorite quote here!
















';

print($trailer);
}

function printQuote ($quote, $author)
{
$quotation = "




$quote


$author






";

print($quotation);
}

// Get the choice
$choice = $_POST['choice'];

$fileName = "quotes.txt";
printHeader();

if ($choice == "generate")
{
   // Read all the lines of the quotation file into an array.
   $quotationLines = file ($fileName, FILE_IGNORE_NEW_LINES);

   // Each quotation is spread over two contiguous lines in the quotation file - first
   // line has the quotation text and second has the author information.
   $numQuotes = count($quotationLines) / 2;

   // Select a random quote from existing quotations, and display it.
   $selected = rand(0, ($numQuotes-1));   // Array indexing starts at 0.

   // Ith quotation starts at line 2*I and ends at line 2*I+1 .
   printQuote($quotationLines[2*$selected], $quotationLines[2*$selected+1]);
}
else if ($choice == "add")
{
   $uquote = $_POST['uquote'];
   $uauth = $_POST['uauth'];

   // Open the quotation file in append mode
   $handle = fopen($fileName, 'a');
   fputs($handle, $uquote . "\n");
   fputs($handle, "- " . $uauth . "\n");
   fclose($handle);
   
}

printTrailer();

?>


Now I was told that the quotes.txt does not have newline ending for the last line and I needed to Fix it before trying to add new quotes to this file via the script.

What do they mean by not having a newline ending?  My quote file consists of the following:

Humpty Dumpty was pushed.
- Unknown
How come there's only one Monopolies Commission?
- Unknown
"Television won't matter in your lifetime or mine."
- Radio Times editor Rex Lambert, 1936
"Everything worthwhile has already been invented."
- director of the US PATENT Office, 1899.
"A computer lets you make more mistakes faster than any invention in human history--with the possible exceptions of handguns and TEQUILA."
- Mitch Ratliffe
"Cats are smarter than dogs. You can't get eight cats to pull a sled through snow."
- Jeff Valdez
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
- Rich Cook
"No *censored* ever won a war by dying for his country. He won it by MAKING the other poor dumb *censored* die for his country."
- Gen. George S. Patton
"The Swiss have an interesting army. Five hundred years without a war. Pretty impressive. Also pretty LUCKY for them. Ever see that little Swiss Army knife they have to fight with? Not much of a weapon there. Corkscrews. Bottle openers. 'Come on, buddy, let's go. You get past me, the guy in back of me, he's got a spoon. Back off. I've got the toe clippers right here.'"
- Jerry Seinfeld
There is only one difference between a madman and me. I am not mad.
- Salvador Dali
"Radio has no future." "X-rays are clearly a hoax." "The aeroplane is scientifically impossible."
- Royal Society president Lord Kelvin, 1897-9.
"The atom bomb will never go off - and I speak as an expert in explosives."
- U.S. Admiral William Leahy in 1945.
this fortune would be seven words long if it were six words shorter.
- Unknown
1248.

Solve : how to block right-click on my site?

Answer»

Hi, anyone can help ?

i want to Block right-Click when some one visit My Website and also don't allow to save the Web Page ,
is it possible to do it with Simple HTML CODE ?
any help appreciated ,
Google:

http://www.google.com/search?ie=UTF-8&oe=UTF-8&sourceid=navclient&gfns=1&q=block+right+click+with+javascriptClick -> HERE <-

You cannot block the user from saving the web page document, every BROWSER reads the document and puts it in a temporary folder already, so technically it's saved on the user's computer, you would literally have to inject some kind of virus that would block the menu(for whatever browser the user is using, and then just hope they have that particular browser, fyi people for the most part use IE and FF), and no one likes those kind of nasties! So NO, you CANNOT block the user from saving the web page is your answer. Now you could go as far as encryption with ascii using the escape function in Javascript. Personally I use my own script to encrypt my HTML followed by ascii to encode the encrypting function. I mean if anyone actually takes the time to decode it, then by god they can have it!

Keep in mind the user can still highlight text/pictures and click Edit->Copy & Paste(Ctrl+C, V), so that isn't completely effective as for blocking people from stealing text or pictures, you'll have to use a no-highlight script, now if you need that PLEASE just say the word, and I might just give you my code, maybe...Another thing, sites that block right click really annoy me. Quote from: kpac on January 04, 2010, 09:34:58 AM

Another thing, sites that block right click really annoy me.

Yup me too...I use Proxomitron to disable the no-right-click script.

Oh and on one more note, there is no real fool-proof way to block your content on your site from users trying to steal it, if they want it bad enough, they will get it...as long your site is online, people can/will steal content when they please.
1249.

Solve : My script ran under IE7 but won't under IE8 -- please help?

Answer»

I have a very simple javascript that I was running with every success.  I couple of days ago I uploaded IE8, and now it won't run      Can anyone tell me how to modify my program to work??   When I click the login button (operated by a onClick) NOTHING happens.   HELP!!













   <font size="4">Members Login</font>

   <font size="4">UserID:</font>
   name="id" type="text">

   <font size="4">Password:</font>
type="password">

   

   






Many thanks,
Donna
Donna, it seems to me that most people in the industry feel that IE8 is not READY for prime time.  I have YET to hear of someone who's successfully installed it without experiencing problems.  I would concentrate on downgrading your software back to IE7 rather than MAKING your script work in IE8.Your code seems to  be good.

If you still have IE 8, try clicking the Compatibility button.  It's right next to the "GO" button at the top of the window.  Try opening your page again.

If if still doesn't work, I agree with Rob.
IE 8 is FULL of problems and is out for windows update, but I
still don't trust it.  It really screwed up my computer a while ago, so I use Firefox.

Speaking of Firefox, if you're going to test HTML, I recommend testing in both browsers to make sure it works.

Trevor
1250.

Solve : Need pointed in the right direction.?

Answer»

Hey everyone,

Here is what I am after: At work, we need to be able to post current job openings internally, as well as externally. The internal display needs to show for a certain amount of time before the EXTERNAL posting. I need the job posting to expire after a set period of time in both locations, and I need the posting descriptions to pull from one easily modified central location on the webserver. I would like to do this myself, but if it is something that would be too complex for someone to figure out in a few days, then we can hire the job out, but either way I need a better understanding of what it is that needs to be implemented to make this work.

What I am hoping for are suggestions as to what I should be looking at to start figuring this out. I am assuming it will require php, but unfortunately I have no experience with that. Our current website is PLAIN old HTML, so anything that would go into it should be able to be merged into that fairly easily.

So, suggestions for any sites that explain what I am needing? I plan to put the research in, but I need a starting point to get me there. My assumption (and I really hate making those) is that I will end up with two separate things running, one for the external job posting and one for the internal.

Anyways, I appreciate any help or any suggestions that can get me pointed in the RIGHT direction.

Thanks!

Derek Quote

My assumption (and I really hate making those) is that I will end up with two separate things running, one for the external job posting and one for the internal.
Actually, no. Once the data is in the database, then it's simply a case of choosing how to display it.

Well, it certainly is a good surprise to hear someone saying "I plan to put research in"! Usually the people we get here expect us to do all the work and we sometimes don't even get a "Thanks".

Anyway, I'd recommend starting at the PHP section of W3Schools. This is where I started and now I like to think I KNOW enough to be dangerous. I also bought a book on the subject, called "PHP and MySQL Development for Dummies". You should be able to pick it up in most shops and online, and it's definitely a good read. It's a lot easier to follow the put if you have basic knowledge first though.

Good luck!Thanks, that should help me get started on this.

If you don't mind, can you tell me if this scenario is possible?

Can it be setup to where we can send an email to a certain address (using say a form through Outlook) that the website can then use to populate the info for the job postings section?

Have a form that has all the required fields the website would require, such as description, start date for the posting, date the posting expires, etc... and then have the webserver look at those emails through that address and use that info from the latest emails to populate the job postings page?

Thanks,

DerekOh, it's definitely possible. It's just like a mini CMS...

It's pretty much the same idea as this forum. You enter the data through a form, and then the forum displays it in multiple ways.Why reinvent the wheel? If you do not currently have the experience to do this yourself. You could use a content management system like Joomla! and then use one of the many community built extensions to quickly get your job board up and running.

Here are a few that I found at the Joomla extension site:

There could be more, but these are a few I found. What kind of scale  are you thinking of?
If it is just a few items a fully automatic system would not be needed,
PHP was mentioned. That is a "Server Side" method and is used often in forums and blogs to manage dated material. This forum is in PHP.

On a smaller scale you can have a simple HTML page that has an "include" that is provided by the server. On a given date it will begin and on another  certain date it expires. That would be suitable for a small job that does not justify setting up a SQL file. This kind of very simple server side method can be set up easily with Front Page, the web editor included in Microsoft Office. But the web server has to have the Front Page extensions enabled.
You may not go that way, but I just wanted to mentioned it a simple solution for a small number if items.