Jump to content

Search the Community

Showing results for tags 'html'.



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

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 723 results

  1. Eric_B

    Calling javascript in html

    I'm trying to create a script that contains an if/else statement that uses an outside input to change the color of a box in the html file. Currently I am not seeing any changes, so right now I'm checking if the script is even being noticed and ran. I'll admit that I'm not very good at this, so I apologize if these are really simple problems to fix or that they've been fixed before and I missed it when searching for other posts. If it's the latter, could you send me a link. Placement: Currently the script is inside the a style tag, and both are outside the body. Should I not have it in the style tag? Should I keep it outside of the body? If the issue is placement, where should I place it. Currently the if/else statement is not in a function. Does it need to be in a function? If so, how should I set it up so the function gets called every time, but does nothing until the if condition is met? if I don't need it to be a function to run this, how else can I set it up so it will run? Here's the part of the code that I'm working on, Ignore the contents as all I'm looking for is how to get the script to be noticed and ran. <script= text/javascript> var StopTimePivatic = [[175]]; if (StopTimePivatic != 0){ #b[[141]]{ style.background-color= silver; } } else{ #b80, #b81, #b82, #b83, #b84, #b85, #b86, #b87, #b88, #b89, #b90 { style.background-color = Yellow; style.color = black; } #b0, #b1, #b2, #b3, #b4, #b5, #b6, #b7, #b8, #b9, #b10, #b11, #b12, #b13, #b14, #b15, #b16, #b17, #b18, #b19, #b20, #b21, #b22, #b23, #b24, #b25, #b26, #b27, #b28, #b29, #b30, #b31, #b32, #b33, #b34, #b35, #b36, #b37, #b38, #b39, #b40, #b41, #b42, #b43, #b44, #b45, #b46, #b47, #b48, #b49, #b50, #b51, #b52, #b53, #b54, #b55, #b56, #b57, #b58, #b59, #b60, #b61, #b62, #b63, #b64, #b65, #b66, #b67, #b68, #b69, #b70, #b71, #b72, #b73, #b74, #b75, #b76, #b77, #b78, #b79 { style.background-color = red; } } </script> </style> <body onload="bundle()"> As I said previously, If as similar problem to this has been solved, please let me know where i can find it.
  2. s_avinash_s

    submit with xhttp

    Hi Am trying to submit the data to server, nothing is received on server. I mean "dismissed students" and "failed students " am filling and sending but not receiving on server side. How to get the data on server side. <div id="Examination" class="tabcontent"> <html> <body> <p id="exam"></p> dismissed students: <input type="text" name="index1" size="10"> <br><br> failed students: <input type="text" name="index2" size="10"> <button type="button" onclick="entry()">submit</button> <script> function entry() { var formData = new FormData(); var valid = new XMLHttpRequest(); valid.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { document.getElementById("exam").innerHTML = this.responseText; } }; valid.open("POST", "exam.txt", true); xhttp.send(formData); } </script> I just added "formData" and i get just some junk characters not original data.How to fill the data in "formData" How to get the data, anything else is required to make it work. Thanks Avinash
  3. ALERT: This question can be answered by both new and old users who do not like pop-ups, because it is an iPhone -- an environment in which the now infamous/famous Grammar Captive splash panel is forever suppressed. BACKGROUND: After many excruciating hours the responsive design of Grammar Captive is nearly complete. One of the several known outstanding problems that remains occurs when one uses Grammar Captive's custom search engines with an iPhone. In order to enter one's search word or phrase the iPhone keyboard appears. It works like a bad wine that starts with an attractive bouquet and flavor, but ends with a strong, even foul, after taste. An alternative analogy is a misbehaved (innocent or malevolent) child that leaves his parents or older siblings to clean up after his after he has played. In effect, the keyboard takes up the entire width of the viewport, but does not return the webpage that hosts the form input control that evokes it. Although I was able to find a possible solution on StackOverflow it has proven difficult to implement. PROPOSED SOLUTION: Add an id attribute to the page's meta tag that hosts the viewport control and reference that tag when the search is submitted. Before Search: <meta id="viewport" name="viewport" content="width=device-width, initial-scale=1"> After Search: $('#viewport').attr('content', 'width=device-width, initial-scale=0.5'); I believe the reason that this works for others, but not for me is that Javascript cannot find #viewport. This is because of the sequencing of the Javascript that produces the dynamically loaded center panel. In brief, overview.js is loaded with overview.html (the Grammar Captive mainpage) search_letter.js is loaded by overview.js after the search panel has loaded, but before a search is made. If the After Search modification is to be implement, then it must be implemented after the search has been completed. QUESTION ONE: Am I likely correct in my assessment? QUESTION TWO: If so, how might I resolve the problem? Roddy
  4. Hello everybody, I was playing with a template from the w3.css templates from w3 schools and found an issue that I can't get around. In the template called Parralax template or the forth one from top, with the man with grey hat, I saw that the home screen image was loaded from the css .bgimg-1{ min-height: 100%; background-image: url(/w3images/parallax1.jpg); } (from the style brackets after the head tag ) I wanted to do a transition between two images but only found examples on the web that it is possible only when the image is loaded from an html image tag, so I removed the "background-image" from the above css code and added an <img src="/w3images/parallax1.jpg"> tag under the div where the class name was bgimg-1: <!-- First Parallax Image with Logo Text --> <div class="bgimg-1 w3-display-container w3-opacity-min" id="home"> <img src="/w3images/parallax1.jpg"> <div class="w3-display-middle" style="white-space:nowrap;"> <span class="w3-center w3-padding-large w3-black w3-xlarge w3-wide w3-animate-opacity">MY <span class="w3-hide-small">WEBSITE</span> LOGO</span> </div> </div> However, the image now has an empty white space from it's right side and I can't make it full. Does anybody know how to fix that?
  5. BACKGROUND: Recently I had occasion to make a search on my own website using the Newsletter search engine. What I discovered was the most bizarre of behaviors. I could perform one search in Japanese and then no more. In other languages such as French, German, and English I could perform as many searches as I liked -- even repeating the same words more than once -- and I always I was able to produce the expected result. Mind you, this bizarre one-find-stop--all-further-finds behavior in the Japanese language was not the case when I first installed my search engines. Now, I have checked my PHP error.log file and found nothing related to this problem. I have also checked that the parameter value of the AJAX call is being properly passed; here too there is no unusual behavior. This bizarre behavior was not always the case. It appears to have begun taking place all of its own. Any ideas? Roddy
  6. BACKGROUND: I am baffled by the failure of this code to display "Return User" when the browser page is refreshed or the browser page is closed and then reopened. The vslue of the console.log(localStorage) displays: Storage { return_user: "true", length: 1 } CODE: const output = document.querySelector('.output'); if (typeof localStorage !== "undefined") { var localStorage = window.localStorage; if(localStorage.getItem("return_user")) { output.innerHTML = "Return User"; } else { output.innerHTML = "New User"; localStorage.setItem("return_user", true); console.log(localStorage); } } else { output.innerHTML = "Sorry, local storage is not supported."; } QUESTION: Any ideas? Roddy
  7. Hello & Thanks , Seems to me that I once saw a chart of Html elements showing the allowable properties and values and inheritances of each element . Anyone know where this is located ? Ugh ! I forgot to bookmark it . Thanks
  8. Sigmahokies

    Frame changing by link

    Hi everyone, inside PhpStorm, seem tag of frame has been strike, it might mean it is not support. I want to create like paginate data, but I just want to have page inside frame on page, so I can leave video on left, then other column can be change page by link. Anyone can help? Thanks, Gary
  9. Hello & Thanks , I am having trouble giving a <div> a background color : <div class="Cell" style="width: 25%; border-style: solid; border-color: #FF0000; background-color: D3DDEB; display: inline-block; padding-left: 5px; padding-right: 5px; "> I am using this example: https://www.w3schools.com/htmL/tryit.asp?filename=tryhtml5_migrate_7 I am using inline style= , when I get proper results , then I will transpose code into css styles . <!DOCTYPE html> <html lang="en"> <head> <title>HTML5</title> <meta charset="utf-8"> <style> body { font-family: Verdana, sans-serif; font-size: 0.8em; } header, nav, section, article, footer, div.city { border: 1px solid grey; margin: 5px; padding: 8px; } nav ul { margin: 0; padding: 0; } nav ul li { display: inline; margin: 5px; } </style> </head> <body> <header> <h1>HTML5 Skeleton</h1> </header> <nav> <ul> <li>News</li> <li>Sports</li> <li>Weather</li> </ul> </nav> <article> <h2>Famous Cities</h2> <div class="London" style="background-color: #00FF00;"> <h2>London</h2> <p>London is the capital city of England. It is the most populous city in the United Kingdom, with a metropolitan area of over 13 million inhabitants.</p> </div> <div class="Paris" style="background-color: #FF0000;"> <h2>Paris</h2> <p>Paris is the capital and most populous city of France.</p> </div> <div class="Tokyo" style="background-color: #0000FF;"> <h2>Tokyo</h2> <p>Tokyo is the capital of Japan, the center of the Greater Tokyo Area, and the most populous metropolitan area in the world.</p> </div> </article> <footer> <p>&copy; 2014 W3Schools. All rights reserved.</p> </footer> </body> </html> And here is my example code: <!DOCTYPE html> <html> <head> <title>DIVs Template WIP</title> <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>DivsOnlyTemplate</title> <!-- file:///C:/vmars.us/DivsOnly-STARTover.html https://www.dummies.com/web-design-development/css3/using-the-div-tag-to-create-tables/ https://htmlformatter.com/ https://www.w3schools.com/htmL/tryit.asp?filename=tryhtml5_migrate_7 --> <style type="text/css"> </style> </head> <body style="background-color: #FFFFFF;"> <br> <div class="Table" style="border-style: solid; text-align: center; border-color: #5A697D; border-width: 16px;"> <!-- ============NewRow============== --> <p></p> <div class="Row" style="border-style: solid solid solid solid; border-width: 4px; border-color: #000000;"> <div class="Cell" style="width: 25%; border-style: solid; border-color: #FF0000; background-color: D3DDEB; display: inline-block; padding-left: 5px; padding-right: 5px; "> <p style="border-style: solid; border-color: #0000FF; background-color: D3DDEB"> Row 1 Column 1 <br><img src="Empty.png" alt="Empty.png"></p> </div> <!-- <div class="Cell" --> <div class="Cell" style="width:70%; border-style: solid; border-color: #00FF00; background-color: 000000; display: inline-block; padding-left: 5px; padding-right: 5px; "> <p> Row 1 Column 2 <br><img src="Empty.png" alt="Empty.png"> </p> </div> <!-- <div class="Cell" --> </div> <!-- <div class="Row" --> </div> <!-- <div class="Table"> --> </body> </html> Please what am I doing wrong ? Thanks
  10. Hello & Thanks , In the code below , I am getting an extraneous "_" underscore after each "Button" . Pls , how can I avoid this ? Thanks <!DOCTYPE html> <html> <head> <title>Previous-Next-Buttons-NoCss</title> <meta name="viewport" content="width=device-width, initial-scale=1"> </head> <body> <h2>Previous-Next-Buttons-NoCss-W3invision.html</h2> <p style="text-align:center"> <br> <br> <a href="Previous-Next-Buttons-NoCss-01.html"> <input type="button" value="Previous-Next-Buttons-NoCss-01.html" /> </a> &nbsp; &nbsp <a href="Previous-Next-Buttons-NoCss-02.html"> <input type="button" value="Previous-Next-Buttons-NoCss-02.html" /> </a> &nbsp; &nbsp <a href="Previous-Next-Buttons-NoCss-03.html"> <input type="button" value="Previous-Next-Buttons-NoCss-03.html" /> </a> <br> <br> </p> </body> </html>
  11. I have an html email template with social media icons in the footer. When viewed on mobile devices for some reason they are stacking vertically. Below is the footer code <tr> <td align="center" style="-webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; mso-table-lspace: 0pt; mso-table-rspace: 0pt;" valign="top"><!-- BEGIN FOOTER // --> <table border="0" cellpadding="0" cellspacing="0" id="templateFooter" style="-ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; background-color: #FFFFFF; border-collapse: collapse !important; border-top-color: #FFFFFF; border-top-style: solid; border-top-width: 1px; mso-table-lspace: 0pt; mso-table-rspace: 0pt" width="100%"> <tbody> <tr pardot-removable=""> <td align="left" class="footerContent" pardot-data="link-color:#ffffff;" style="text-size-adjust: 100%; color: rgb(255, 255, 255); font-family: Helvetica; font-size: 10px; line-height: 15px; text-align: left; padding: 20px; background: rgb(55, 59, 58);" valign="top"> <div>&nbsp;</div> <div style="text-align: center;"><img alt="Partner Logos" border="0" src="http://info.mission43.org/Mission43_PartnerLogos_Group_WHITE" style="border-width: 0px; border-style: solid;"><br> <br> <a href="https://www.facebook.com/Mission43Idaho/" style="text-size-adjust: 100%; font-weight: normal; color: #ffffff;"><img alt="Facebook" border="0" height="24" src="http://info.mission43.org/l/427472/2017-10-04/7w1mjc/427472/270350/light_facebook_48.png" style="width: 24px; height: 24px; margin-left: 15px; margin-right: 15px; border-width: 0px; border-style: solid;" width="24"></a><a href="https://www.instagram.com/mission43/?hl=en"><img alt="Instagram" border="0" height="24" src="http://info.mission43.org/l/427472/2017-10-04/7w1mj9/427472/270348/light_instagram_48.png" style="width: 24px; height: 24px; margin-left: 15px; margin-right: 15px; border-width: 0px; border-style: solid;" width="24"></a><a href="https://www.linkedin.com/company-beta/10843452/"><img alt="LinkedIn" border="0" height="24" src="http://info.mission43.org/l/427472/2017-10-04/7w1mhy/427472/270344/light_linkedin_48.png" style="width: 24px; height: 24px; margin-left: 15px; margin-right: 15px; border-width: 0px; border-style: solid;" width="24"></a><a href="http://www.mission43.org/"><img alt="Mission43" border="0" height="24" src="http://info.mission43.org/l/427472/2017-10-04/7w1mj1/427472/270346/light_link_48.png" style="width: 24px; height: 24px; margin-left: 15px; margin-right: 15px; border-width: 0px; border-style: solid;" width="24"></a></div> </td> </tr> <tr> <td align="left" class="footerContent" pardot-data="link-color:#ffffff;link-underline:underline;" style="text-size-adjust: 100%; color: rgb(255, 255, 255); font-size: 10px; line-height: 15px; text-align: left; padding: 0px 20px 20px; background: rgb(55, 59, 58);" valign="top"> <hr> <div style="text-align: center;"><a href="http://www.jkaf.org/" style="color: rgb(255, 255, 255);"><img alt="" border="0" src="http://info.mission43.org/l/427472/2017-10-04/7w1mhw/427472/270342/JKAF_Logo.png" style="border-width: 0px; border-style: solid;"></a></div> <div style="text-align: center;"><strong>Our mailing address is:</strong>%%account_address%% <hr><em>Copyright © %%current_year_YYYY%%, All rights reserved.&nbsp;</em>J.A. and Kathryn Albertson Family Foundation. You are receiving these emails because you provided Mission43 with your email address and have been in contact with us. You can update your contact information, or if you no longer wish to receive these types of emails you can <a href="%%unsubscribe%%" style="color: rgb(255, 255, 255);">unsubscribe from this list</a></div> </td> </tr> <tr> <td align="left" class="footerContent original-only" pardot-data="link-color:#ffffff;" style="text-size-adjust: 100%; color: rgb(255, 255, 255); font-family: Helvetica; font-size: 10px; line-height: 15px; text-align: left; padding: 0px 20px 20px; background: rgb(55, 59, 58);" valign="top"><a href="%%unsubscribe%%" style="text-size-adjust: 100%; color: rgb(255, 255, 255); font-weight: normal; text-decoration: underline;">unsubscribe from all emails</a>&nbsp;&nbsp;&nbsp;<a href="%%email_preference_center%%" style="text-size-adjust: 100%; color: rgb(255, 255, 255); font-weight: normal; text-decoration: underline;">update subscription preferences</a>&nbsp;</td> </tr> </tbody> </table> <!-- // END FOOTER --></td> </tr> Not sure if the fix needs to be in the footer or the CSS so I am including my CSS as well. <style type="text/css">#outlook a { padding: 0; } .body{ width: 100% !important; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; margin: 0; padding: 0; } .ExternalClass { width:100%; } .ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div { line-height: 100%; } img { outline: none; text-decoration: none; -ms-interpolation-mode: bicubic; } a img { border: none; } p { margin: 1em 0; } table td { border-collapse: collapse; } /* hide unsubscribe from forwards*/ blockquote .original-only, .WordSection1 .original-only { display: none !important; } @media only screen and (max-width: 480px){ body, table, td, p, a, li, blockquote{-webkit-text-size-adjust:none !important;} /* Prevent Webkit platforms from changing default text sizes */ body{width:100% !important; min-width:100% !important;} /* Prevent iOS Mail from adding padding to the body */ #bodyCell{padding:10px !important;} #templateContainer{ max-width:600px !important; width:100% !important; } h1{ font-size:24px !important; line-height:100% !important; } h2{ font-size:20px !important; line-height:100% !important; } h3{ font-size:18px !important; line-height:100% !important; } h4{ font-size:16px !important; line-height:100% !important; } #templatePreheader{display:none !important;} /* Hide the template preheader to save space */ #headerImage{ height:auto !important; max-width:600px !important; width:100% !important; } .headerContent{ font-size:20px !important; line-height:125% !important; } #bodyImage{ height:auto !important; max-width:560px !important; width:100% !important; } .bodyContent{ font-size:18px !important; line-height:125% !important; } .templateColumnContainer{display:block !important; width:100% !important;} .columnImage{ height:auto !important; max-width:260px !important; width:100% !important; } .leftColumnContent{ font-size:16px !important; line-height:125% !important; } .rightColumnContent{ font-size:16px !important; line-height:125% !important; } .footerContent{ font-size:14px !important; line-height:115% !important; } .footerContent a{display:block !important;} /* Place footer social and utility links on their own lines, for easier access */ } </style> Any ideas would be much appreciated. Thanks!
  12. rizwansyed

    Nested Tabs issue

    Hi Am working on nested tabs, but level 1 tabs work fine but all the level 2 tabs displays data at once. I have attached a source code . For example, with attached code when i click on London->open Collapsible That time internal 3 tabs data in "open collapsible" are visible at once. How can i hide it? Please suggest Thanks and Regards Rizwan Syed test.txt
  13. PLight

    Creating Dynamic Checkbox Names

    I have a need for creating checkbox names that go through a loop and are named by concatenating the name of the field with a number that is the loop index. <%if pDiscussed(i) <> "True" then%> <input type="checkbox" name="ynDiscussed" & CStr(i) value="0" /> <%else%> <input type="checkbox" name="ynDiscussed" & CStr(i) value="1" checked /> <%end if%></td> I've done this before with text boxes and there are no problems but somehow with a checkbox it will not work. I've even tried using an array (ynDiscussed[]) along with... <%if pDiscussed(i) <> "True" then%> <input type="checkbox" name="ynDiscussed(" & CStr(i) & ")" value="0" /> <%else%> <input type="checkbox" name="ynDiscussed(" & CStr(i) & ")" value="1" checked /> <%end if%></td> but it doesn't like that either. I can't even substitute in a number instead of the CStr(i) and have it pick it up - my code reading: <input type="checkbox" name="ynDiscussed" & "1" value="0" /> Is this simply impossible or what am I missing? Any help is very much appreciated. Cheers!
  14. MurderItachi

    CSS Buttons: width and height tags don't work

    Hello Guys, I'm working on a website for my aunt, due to the new privacy law, she needs to update the page with a new Button in the menu. I lost the programm which I created the old .png buttons, so I can't create the new one in the same style. I want to replace the old buttons with new ones, written in css. The only problem is the size of the buttons, they keep scaling with the writting in the button, but I want them all the same size. I attached the code of the css and html, can you help me? I know, the website is written in an old style, her former programmer did all the writting and I overtook the project a while ago. CSS.css Schwarzwaldverein Ortsgruppe Achern.html
  15. Greetings to all the users and administrators of w3scools invisionzone forum. I would love to get some constructive criticism on this web development tutorial site namely webtrickshome. It's been around for slightly more than a year but I redesigned it recently. Any feedback regarding the design and contents would be highly appreciated. Thankyou
  16. acnos

    multiplication and data base

    Hi all ! I wrote this short code : <html> <head> <style> table, th{ max-width: 600px; } .e2 { width: 200px; } </style> </head> <div style="background-color:TRANSPARENT;width:603px"> <body> <table> <tr bgcolor="TRANSPARENT" height="20"> <td class="e2" style="background-color:GREEN"></td> </tr> </table> </body> </div> </html> I have a data base column (in oracle apex), And I would like to have something like that (a multiplication) : .e2 { width = #column# * 600; } Because I would like to have a green horizontal bar chart with different size depending on the values in my database column. So, I tried calc() : did not work... And I also tried : <td style="background-color:GREEN" width=#column#*600></td> <td style="background-color:GREEN" width=calc(#column#*600)></td> Those 2 lines did not work too.. Do you have any idea how to do this multiplication please ? Best regards, acnos
  17. Sigmahokies

    Blur on video background

    Hi everyone, I'm trying to have little blur on background which is video. I added filer:blur(5px) on this video, but it won't work. Is there any way to make it work? I searched in google to see some code in, but none of them are working. Can anyone help? Thanks, Gary Taylor
  18. mysteriousmonkey29

    Interactive web comic aggregator general design?

    Hello, I am currently in the middle of creating a web comic aggregation website. So far, I have written a PHP-based RSS reader that grabs the image source links and publication dates for various web comics from their RSS feeds, and uses this to update a MySQL database. This RSS reader/database updater is configured to run once every several hours and update the database with any new comics it finds. It seems to be working fine, and now I am starting to work on the front end of the website, which needs to grab this information from the ever-growing database, and display it in a user-friendly and interactive format. I wrote the database updater in a fairly procedural way, because it didn't strike me as something that lent itself very much to object-oriented development. However, the front end of the website does strike me as something that I can save myself a lot of time on by coming up with a decent object oriented design first. Unfortunately, I don't have a lot of experience in this, so I thought I would look online for suggestions. So far, I have decided specifically what I would like the front end to do, and have come up with 2 possible approaches to designing it, but am unsure about both. Here's what I would like it to do: (To clarify, when I say the phrase "comic strip," I'm referring to a whole strip like XKCD, Dilbert, the far side, etc., and when I say the phrase "comic," it refers to an individual comic within a comic strip, i.e. the Dilbert comic for 8/30/2016). I would like my webpage, by default, to display a vertically stacked list of the latest comic images from each comic strip in the database. For customization, I want a comic strip control panel, which allows users to decide which comic strips are enabled/disabled, and in what order they are displayed. I would like each comic image to appear between text denoting the name/author of the strip and an individual set of buttons that allows the user to go forward and backward through the archived comics, and also to adjust the size/scaling of the image. Finally, I would like a similar but generalized set of buttons that allows the user to control all the comic strips in the same fashion, but at once. Based on my basic understanding of object oriented programming, and the design approach suggested in this stack overflow answer: http://stackoverflow.com/questions/1100819/how-do-you-design-object-oriented-projects, I came up with one possible design: Two classes: 1) a comic strip class that contains attributes like the comic strip's name, ID number (from my database), enabled/disabled status, and current comic to display (an object of the next class), in addition to functions to get and set each of these variables, 2) a comic class that contains attributes like the image source link, publication date, and scaling percentage, in addition to functions to get and set each of these variables Then the main webpage would contain a comic strip control panel and general comic control panel as described in the desired functionality. In addition, it would contain an array of individual comic control panels, and an array of div tags (or a similar tag), which would be displayed vertically stacked and alternating along with the comic strip names in plain text. Finally, there would be functions for updating comic and comic strip object information from the database, and functions for updating the div tag content for comic display based on the comic object information. All the functions would be called using JavaScript/Ajax from the appropriate buttons. However, I was unsure about this design, so I asked a friend, who suggested that I use a model-view-controller design pattern, which I guess is popular in web development because its potential for separating all the various languages. After reading about this online, I have come up with a possible alternative design: Model: PHP, an array of comic strips, including name and ID number, active/inactive status, and current comic image URL/publishing date View: PHP generated HTML/CSS, as described before, a comic strip control panel for enabling/disabling and ordering, a vertically stacked list of comic strip names, constituent comic images, and individual control buttons, and a general set of buttons for controlling all enabled comics at once Controller: PHP/MySQL, a function to update order and active/inactive comic strip status, a function to update a given comic strip's current comic information, and a function to update all comic strips' current comic information at once As I understand it, the controller functions would be called upon user input into the view (clicking the buttons), which would then update the information stored in the model, and then somehow that would trigger a refresh of the view based on the new model information. I am worried I may have missed something in each of these designs (especially the first one), and unsure about the potential merits of one versus another. I was also wondering if it might be possible to combine the two somehow. Does anyone have any suggestions? Help would be much appreciated
  19. Mxlt

    Problems with a border...help!

    Hi! I need some help with an exercise I am doing. In my exercise, the borders on the right side is taking too much space, I would like it to take only as much space as it needs, with only around 2em of padding, but for some reason, the left side and the upper side seems to have a lot of space....I would appreciate a lot if you could help me. Attached you can find the file and here is a link with the exercise I am doing (the first one). Exercises Thank you! Ejercicio1prueba.htm
  20. wid2001

    HTML Link in email Template

    I am creating a re-usable email template. I am not sure if this can be done but wanted to throw it out there and see if anyone had any ideas. I have a button with a link to a form. The link pre-fills fields in the form with merge tags in the url. I need to make/create a "placeholder" for one of the tags so that I can edit/insert different values as needed. Is this possible with HTML? This all resides in PARDOT, which does have a WYSIWYG editor. When I click on the lick I can pull up the WYSIWIG and change attributes etc. I would love to be able to click the link and have an "Event ID" that would change the portion of the link containing "Event ID" to what I need so that when clicked it pre-fills the field on the form with the correct "Event ID". Everything works fine, I am just trying to find a way to make it easier for the end user when utilizing the template. Hopefully this isn't too vague and I have illustrated what I am trying to do. Thanks!
  21. juan.rojas89

    Block Size

    I have been using the <block-size: XX%;> property to prevent a table from resizing on different screens but I can't seem to get it right, what could I use to solve this? this is an example of how I'm applying the code: HTML <div .div-central> <tr>example1</tr> <tr>example2</tr> <tr>example3</tr> </div> Css .div-central { block-size: 60%; }
  22. Hello I have a problem when it comes to traversing through DOM nodes and accessing their data(values). Please have a look at the following code HTML <!DOCTYPE html> <html> <head> <title>Page Title</title> <script src="js.js"></script> </head> <body> <div id="div1" class="div1"> <img src="1.png" style="width:100px;height:100px;"/> <h1>This is a Heading1</h1> <p>This is a paragraph1.</p> <button onclick="a(0);">Press me</button> </div> <div id="div1" class="div1"> <img src="2.jpeg" style="width:100px;height:100px;"/> <h1>This is a Heading2</h1> <p>This is a paragraph2.</p> <button onclick="a(1);">Press me</button> </div> <div id="div1" class="div1"> <img src="3.jpeg" style="width:100px;height:100px;"/> <h1>This is a Heading3</h1> <p>This is a paragraph3.</p> <button onclick="a(2);">Press me</button> </div> </body> </html> JAVASCRIPT var elements = document.getElementsByClassName("div1"); function a(index) { var d = elements[index].childNodes[3].nodeValue; alert(d); } Okay so according to my understanding if I want to access and alert the first div's h1 text value which is "This is Heading1" then my JavaScript code should be var d = elements[index].childNodes[1].nodeValue; However I do not get the text value? Also nodeValue gives me NULL if I use innerHTML I get the text value but at childNodes[3] and not childNodes[1] where you'd expect it to be? Also this example contradicts everything you find at https://www.w3schools.com/js/js_htmldom_navigation.asp Can someone please elaborate on this as it is very important to understand and I am tearing my hair out trying to figure this out.
  23. Is it possible to use this lightbox code with multiple galleries? At the moment, when using it with different galleries, lightbox will pop up, but it only show first gallery, and the others won't display. I have implemented this lightbox code with my PHP code and for the first gallery, everything is fine, but when I click others, only those gallery thumbnails will show up, but the currentSlide isn't and I understand that code changes only in the first gallery. My code: <div class="row"> <div class="row-inner" id="ajax-posts"> <?php while( $refs->have_posts() ): $refs->the_post(); // get_template_part('content/content', 'reference'); $galleryarray = get_post_gallery_ids($post->ID); ?> <div class="gridbox reference <?php if(DOING_AJAX) {echo " added";} ?>"> <a> <div class="bg_img cursor"<?php if ( $thumbnail_id = get_post_thumbnail_id() ) { if ( $image_src = wp_get_attachment_image_src( $thumbnail_id, 'normal-bg' ) ) printf( ' style="background-image: url(%s);"', $image_src[0] ); } ?> onclick="openModal(<?php echo $i; ?>);currentSlide(<?php echo $id ?>)"> </div> <h3><?php the_title(); ?></h3> <p><?php the_time('Y'); ?><br><?php the_category( ', ' ); ?></p> </a> </div> <!-- Modal --> <div id="myModal-<?php echo $i; ?>" class="modal"> <span class="close cursor" onclick="closeModal(<?php echo $i; ?>)">&times;</span> <div class="modal-content"> <?php foreach ($galleryarray as $index => $id) { $image = wp_get_attachment_image_src( $id, ‘thumb’ ); /* $attachment_meta = wp_get_attachment( $id );*/ $number = $index+1; ?> <div id="img-<?php echo $id; ?>" class="mySlides"> <div class="numbertext"><?php echo $number; ?> / <?php echo count($galleryarray); ?></div> <img id="<?php echo $id; ?>" src="<?php echo $image[0]; ?>" style="width:100%"> </div> <?php } ?> <a class="prev" onclick="plusSlides(-1)">&#10094;</a> <a class="next" onclick="plusSlides(1)">&#10095;</a> <div class="caption-container"> <p id="caption"></p> </div> <?php foreach ($galleryarray as $index => $id) { $image = wp_get_attachment_image_src( $id, ‘thumb’ ); /* $attachment_meta = wp_get_attachment( $id );*/ $alt = get_post_meta( $id, '_wp_attachment_image_alt', true); $number = $index+1; ?> <div class="column"> <img id="<?php echo $id; ?>" class="demo cursor" src="<?php echo $image[0]; ?>" style="width:100%" onclick="currentSlide(<?php echo $number ?>)" alt="<?php echo $alt; ?>"> </div> <?php } ?> </div> </div> <?php $i++; endwhile; ?> </div> </div> function openModal(i) { document.getElementById('myModal-'+i).style.display = "block"; document.getElementById('pageHeader').style.zIndex = "0"; document.getElementById('pageFooter').style.zIndex = "0"; document.getElementById('pageContainer').style.textAlign = "left"; } function closeModal(i) { document.getElementById('myModal-'+i).style.display = "none"; document.getElementById('pageHeader').style.zIndex = "10"; document.getElementById('pageFooter').style.zIndex = "9"; document.getElementById('pageContainer').style.textAlign = "center"; } var slideIndex = 1; showSlides(slideIndex); function plusSlides(n) { showSlides(slideIndex += n); } function currentSlide(n) { showSlides(slideIndex = n); } function showSlides(n) { var i; var slides = document.getElementsByClassName("mySlides"); var dots = document.getElementsByClassName("demo"); var captionText = document.getElementById("caption"); if (n > slides.length) {slideIndex = 1} if (n < 1) {slideIndex = slides.length;} console.log(slideIndex); for (i = 0; i < slides.length; i++) { slides[i].style.display = "none"; } for (i = 0; i < dots.length; i++) { dots[i].className = dots[i].className.replace(" active", ""); } slides[slideIndex-1].style.display = "block"; dots[slideIndex-1].className += " active"; captionText.innerHTML = dots[slideIndex-1].alt; } Is it possible to change that code somehow to get it working, or maybe better solution is to sum up every gallery array to one, and make one Modal, where those galleries pop up only when clicking on the right gallery?
  24. juan.rojas89

    White spaces in my table

    Hi people! I'm having an issue in my coding, I created a table and there is a white spacing between cells that I cant get rid of. I have used cellpadding, styled the no border and still comes up. I'm also programming in HubSpot so I don't know if this has anything to do since I'm still doing it in HTML. This is an example of the code used: <tr style="height: 127.056px; border: 0px; border-spacing: 0px;"> <td style="width: 304px; background-image: url('https://cdn2.hubspot.net/hubfs/2294395/gray_BB-07-1.png'); background-size: 100% 100%; background-repeat: no-repeat; height: 127.056px;"> <h1 style="color: #84161a; text-align: center; font-family: Agency FB;"><span style="font-size: 36px;">ADMIN&nbsp;<span style="color: #444444;">EMILY</span></span></h1> </td> <td style="width: 314px; background-image: url('https://cdn2.hubspot.net/hubfs/2294395/gray_BB-07-1.png'); background-size: 100% 100%; background-repeat: no-repeat; height: 127.056px;"> <h1 style="color: #84161a; text-align: center; font-family: Agency FB;"><span style="color: #444444; font-size: 36px;"><span style="color: #800000;">MARKETING</span>&nbsp;EMILY</span></h1> </td> <td style="width: 298.208px; background-image: url('https://cdn2.hubspot.net/hubfs/2294395/gray_BB-07-1.png'); background-size: 100% 100%; background-repeat: no-repeat; height: 127.056px;"> <h1 style="color: #84161a; text-align: center; font-family: Agency FB;"><span style="font-size: 36px;">DATA <span style="color: #444444;">EMILY</span></span></h1> </td> <td style="width: 302.792px; background-image: url('https://cdn2.hubspot.net/hubfs/2294395/gray_BB-07-1.png'); background-size: 100% 100%; background-repeat: no-repeat; height: 127.056px;"> <h1 style="color: #84161a; text-align: center; font-family: Agency FB;"><span style="font-size: 36px;">SALES <span style="color: #444444;">EMILY</span></span></h1> </td> <td style="width: 320px; background-image: url('https://cdn2.hubspot.net/hubfs/2294395/gray_BB-07-1.png'); background-size: 100% 100%; background-repeat: no-repeat; height: 127.056px;"> <h1 style="color: #84161a; text-align: center; font-family: Agency FB;"><span style="font-size: 36px;">CUSTOMER SERVICE <span style="color: #444444;">EMILY</span></span></h1> </td> </tr>
  25. BACKGROUND: I would like to embed a Matomo widget into a page, but I dare not embed it directly. For, to do so would require that I expose the authorization token that enables knowledgeable visitors of Matomo -- and coding in general -- the ability to view everything about my website that I am able to view. As I, myself, do not yet know what to do with everything that Matomo makes available (it appears endless), I certainly do not want to put it all into the hands of others willy-nilly. It is simply bad business. OBJECTIVE: Read the data into a PHP file, and load the result into the src attribute of an iframe. Below is sample code taken directly from the Matomo website. (The absence of the authorization token assumes that the superuser has given access to all users the right to view whatever they like. I do not wish to grant this privilege). SIMPLE URL https://www.nudge.online/_utilities/php/matomo/index.php?module=Widgetize&action=iframe&widget=1&moduleToWidgetize=Live&actionToWidgetize=getSimpleLastVisitCount&idSite=1&period=day&date=yesterday&disableLink=1&widget=1 EMBEDDING CODE <div id="widgetIframe"><iframe width="100%" height="350" src="https://www.nudge.online/_utilities/php/matomo/index.php?module=Widgetize&action=iframe&widget=1&moduleToWidgetize=Live&actionToWidgetize=getSimpleLastVisitCount&idSite=1&period=day&date=yesterday&disableLink=1&widget=1" scrolling="no" frameborder="0" marginheight="0" marginwidth="0"></iframe></div> Obviously, there is no difference in the URLs. QUESTION: If an image can be created by a PHP file and then read into the src attribute of an image tag, surely it must then also be possible to read the HTML content of a PHP file into the src attribute of an iFrame. What is the necessary header argument required? I have tried both " header('Content-Type: text/html'); and header('Content-Type: text/plain'); Neither works! Or, am I just guessing. And, what I am trying to do simply does not work. Roddy
×