Jump to content

Search the Community

Showing results for tags 'beginner'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Calendars

  • Community Calendar

Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 8 results

  1. Script definition in header

    I am a complete beginner and am trying to learn HTML at the same time as modifying an existing website to be mobile friendly @media only screen and (max-width: 500px) { body { background-color: lightblue; } } @media only screen and (min-width: 500px) { body { background-color: coral; } } </style> </head> <body> <div id="slSection"> <umbraco:Macro splashMedia="[#splashMedia]" Alias="SplashScreenSlideshow1" runat="server"></umbraco:Macro> </div> Above is a code fragmant I need help with, as a test I haveset the page to change background colour from lightblue to corel when viewed on a smaller screen and this works. Further down the code calls a script called SplashScreenSlideshow1 My problem is I would like call a different script based on the size of the viewing screen. How do I define a script name based on the screen size? Any help gratefully received Thanks Andrew
  2. Understanding errors in XML

    Hi everyone, I'm a beginner in XML and I'm still learning the basics. I need to find how many errors are in the following XML document: <?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?> <!DOCTYPE université [ <!ELEMENT université (faculté*,description*)*> <!ELEMENT faculté (département*)> <!ELEMENT département EMPTY> <!ATTLIST département nom CDATA #REQUIRED xmlnote (vide|plein) "plein"> <!ATTLIST université téléphone ID #REQUIRED> ]> <université téléphone="514-4321" xml:lang="fr"> <description>La plus grande.</description> <faculté nom="sciences"> <département nom="mathématiques"></département> <département nom="sociologie" xmlnote="vide"/> </faculté> </université> Eclipse flagged the following errors: Attribute "nom" must be declared for element type "faculté". (line 7)Attribute "xml:lang" must be declared for element type "université". (line 6) Attribute value "514-4321" of type ID must be a name. (line 6) Could someone kindly explain those errors and what I did wrong? Is it possible that more errors than the ones Eclipse flagged are in the file? What validation tools do you guys use? Thank you very much in advance!
  3. XSL Starter Problem

    Hello, I have dealt quite a lot with XML in the past, now i have to delve into XSL.A text needs to be transformed, and, although i read and understood several tutorials, i still can not see what on earth i am doing wrong. I am sure this will be a minor mistake, any help will be appreciated. My XML: <?xml version="1.0" encoding="UTF-8"?>
<!--<?xml-model href="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/teilite.rng" schematypens="http://relaxng.org/ns/structure/1.0"?>-->
<?xml-stylesheet type="text/xsl" href="tmzb.xsl" ?>
<TEI xmlns="http://www.tei-c.org/ns/1.0">
 <teiHeader>
 <fileDesc>
 <titleStmt>
 <title>Title</title>
 </titleStmt>
 <publicationStmt>
 <p>Publication information</p>
 </publicationStmt>
 <sourceDesc>
 <p>Information about the source</p>
 </sourceDesc>
 </fileDesc>
 </teiHeader>
 <text>
 <body>
 <head>Erstes Kapitel</head>
 <head>Ankunft</head>
 <p>Ein einfacher junger Mensch reiste im Hochsommer von Hamburg, seiner Vaterstadt, nach
 Davos-Platz im Graubündischen. Er fuhr auf Besuch für drei Wochen.</p>
 <p>Von Hamburg bis
 dort hinauf, das ist aber eine weite Reise; zu weit ei- gentlich im Verhältnis zu einem so
 kurzen Aufenthalt. Es geht durch meh- rerer Herren Länder, bergauf und bergab, von der
 süddeutschen Hochebene hinunter zum Gestade des Schwäbischen Meeres und zu Schiff über seine
 springenden Wellen hin, dahin über Schlünde, die früher für unergründlich 10 galten.</p>
 </body>
 </text>
</TEI> My XSL: <?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0"xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <html> <body> <h2> <xsl:value-of select="/TEI/text[1]/front[1]/div1[1]/head[1]"/> </h2> </body> </html> </xsl:template> </xsl:stylesheet>
  4. I'm trying to transform a SVG-file into another XML-file using XSLT and the C# class XslCompiledTransform. This is my SVG <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events" version="1.1" baseProfile="full" width="800mm" height="600mm"><rect x="10" y="10" width="90" height="40" /></svg> This is my C#-Code static void Main(string[] args) { string xmlSource = args[0]; string xmlOutput = args[1]; string xsltFile = args[2]; // if xslt or soure contains a DTD: XmlReaderSettings xmlReadSet = new XmlReaderSettings(); xmlReadSet.DtdProcessing = DtdProcessing.Parse; xmlReadSet.ValidationType = ValidationType.Schema; XslCompiledTransform xslt = new XslCompiledTransform(); // XmlWriterSettings xmlWriteSet = new XmlWriterSettings(); xmlWriteSet.ConformanceLevel = ConformanceLevel.Auto; // xslt.Load(xsltFile); xslt.Transform(XmlReader.Create(xmlSource, xmlReadSet), XmlWriter.Create(xmlOutput, xmlWriteSet)); } And this is my XSLT <?xml version="1.0" encoding="utf-8"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"> <xsl:output method="xml" version="1.0" indent="yes" encoding="utf-8" omit-xml-declaration="no"/> <xsl:template match="/"> <xsl:element name="Redlining"> <xsl:attribute name="hash">???</xsl:attribute> <xsl:attribute name="version">4.1</xsl:attribute> <xsl:element name="BoundingBox"> <xsl:attribute name="xMin">???</xsl:attribute> <xsl:attribute name="yMin">???</xsl:attribute> <xsl:attribute name="xMax">???</xsl:attribute> <xsl:attribute name="yMax">???</xsl:attribute> </xsl:element> <xsl:element name="GeometryHolder" /> <xsl:apply-templates select="rect"/> </xsl:element> </xsl:template> <xsl:template match="rect"> <xsl:element name="RectangleHolder"> <xsl:element name="Sector"> <xsl:attribute name="type">sector</xsl:attribute> <xsl:element name="Coordinate"> <xsl:attribute name="x"> <xsl:value-of select="@x + @width"/> </xsl:attribute> </xsl:element> </xsl:element> </xsl:element> </xsl:template></xsl:stylesheet> And this is what I get <Redlining hash="???" version="4.1"><BoundingBox xMin="???" yMin="???" xMax="???" yMax="???" /><GeometryHolder /></Redlining> As you can see the template "rect" is omitted. I got the advice to use this ... <xsl:apply-templates select=".//*[local-name()='rect']"/> ... ... <xsl:template match="*[local-name()='rect']"> ... Then I get what I want. But I don't understand what is wrong with my attempt since it seems that all the tutorials do it like my attempt. Or am I missing something? Thanks for reading, Stefan
  5. Can't read the file

    I am developing the file locally with LAMPP and my source file is like this: <?php echo "The server is working"; ?><?php$file=fopen("file.txt", "r") or exit("Unable to open file!");?> In the same directory is a text file named file.txt and it has a line on text in it. The output however is only The server is working. Nothing else.
  6. Drop down with Submit button

    I'm new to programming in general and am attempting to learn java script. I've been searching the internet trying to find the answer to this and I can not. I've learned how to use a text input with a submit button to collect and use data from a user. I've been trying to get a dropdown menu <select> </select> to take data from a user with the submit button. I know how to make the menu and populate it, but not with an array yet. Can anyone give me some advice on how to make this work? the tutorials on this site have helped but I can not get a good result. <html><head> <title>Another Test</title><script type="text/javascript"> function checkYear(theYear){if (theYear == 1985){alert ("it works");}else{alert ("broken");}} </script> </head> <body> <form method="POST" name="yearForm" onSubmit="checkYear(document.yearForm.theYear);"><select name="theYear" id="idYear" value="year"><option value="1985">1985</option><option value="1986">1986</option></select> <input type="submit" name="submit" value="submit" /> </form> </body</html>
  7. Hi all, I have just started learning PHP. I hit into this wall currently where I have a page(main.php) which stores the session value 'name' of the login personnel.On login to main.php, some sql scripts will run and username and some values will be shown on the page. The page also allows user to input some values and on submit, the value will be send to confirm.php to validate. So on confirm.php, I have this small code if ($tday < $day){ if($tmth <= $mth){ echo "Please select a valid Date!!"; header("Refresh: 3; url=http://localhost/main.php");} else{ $tempDay = cal_days_in_month(0,$mth,$yr); $tempTotal = $tday + ($tempDay-$day); $calDays = $tempTotal + 1; echo "Total Number of Days Taken is ".$calDays; } } This line header("Refresh: 3; url=http://localhost/main.php"); will redirect back to the previous page automatically after 3 seconds.but I find that the session value 'name' is not loaded. anyway i can change it to reload the whole main.php? TIABai
  8. Just Starting Php

    Hi all, I saw this code of a form that uses a PHP script. It was in a book, where i am learning PHP, but it didn't worked. What i mean is that the form was ok and when i clicked the button i went to another page of the PHP file, but then there was just the messages of echo command without the variable parameters, or they were unchanging, maybe there is something wrong in the syntax? I use linux, do i need to set permissions in the files?(now they are rw for user, group and others) <html><form method=post action=processa.php>Seu Nome:<input type=text name=edNome><br><br>Vinho preferido:<input type=radio name=rgVinho value=br checked>Vinho Branco<input type=radio name=rgVinho value=mr >Merlot<input type=radio name=rgVinho value=tt >Tinto<br><br>Hora ideal para beber:<input type=checkbox name=bebi[] value=m >Manhã<input type=checkbox name=bebi[] value=a >Almoço<input type=checkbox name=bebi[] value=j >Jantar<input type=checkbox name=bebi[] value=q >A qualquer hora<br><br><input type=submit value="Click aqui"></form></html> This is in the file processa.php:<?phpswitch ($rgVinho) {case 'br': $msgVinho='Ovinho branco é bom para o coração';break;case 'tt':$msgVinho='O vinho tinto é bom para o sangue';break;default: $msgVinho='O merlot é excelente';break;} $qtsVezes = count($bebi);if ($qtsVezes <=1)$msgVezes='Você bebe moderadamente';elseif ($qtsVezes > 1 && $qtsVezes < 4 )$msgVezes='é melhor ir com calma!';else $msgVezes='Melhor você procurar um centro de AA.'; echo "Como vai $edNome?";echo "$msgVinho $msgVezes";?> Thank you
×