I am totally new to Web Development. Here, I have an HTML file which I am showing in the text-angualr. Here, I am getting a string which is from the Html file itself like you can say,
<p style="padding:0;color:#000000;font-size:12pt;line-height:1.0;margin-right:0;margin-left:72pt;text-indent:-72pt;font-family:"Times New Roman";margin-top:0;orphans:2;margin-bottom:0;widows:2;text-align:justify"><span style="vertical-align:baseline;font-size:11pt;font-family:"Calibri";font-weight:700">Description: </span><span style="color:#000000;font-weight:400;text-decoration:none;vertical-align:baseline;font-size:11pt;font-family:"Calibri";font-style:normal">Developed web app for add management.</span></p>
<span style="vertical-align:baseline;font-size:11pt;font-family:"Calibri";font-weight:700">Contribution: </span><span style="vertical-align:baseline;font-size:11pt;font-family:"Calibri";font-weight:400">It was the internal use web app for the <br>we developed the app for the add management for the. </span>
this is a Html document,which represents it
Description: Developed web app for add management.
Contribution: It was the internal use web app for the
we developed the app for the add management for the
Here, I am able to highlight a single word from this text. what I want is to highlight a whole text like from Description to the, which I am getting as an input. I tried Different options like,
How to highlight text using javascript
Here From this I am able to highlight a text which is in one tag but what about the remaining text in the next few tags ? I am not able to understand this, can any one please explain me this? The solution I tried was 3rd one. I don't have required reputation to put a comment so I am asking this question. Thanks in advance.
Related
I am wanting to create a blog, this blog is for me to record my journey learning to become a software engineer/web developer. I have a separate offline blog uploader where I will create a title and the content and upload it to a database this has two inputs.
1.title
2.post_text
. However I want my blog posts to be able to render custom html for example the output from the database is this title: Test, post_text:<h1>This is a test!</h1>
However I have no clue how to render this HTML.I tried using createElement() and. then adding that to the DOM however that wasn't working First step is displaying it on the 'all posts' section in mini cards. Next would be creating the page that will render this detail.
I am using React.js for the blog. Can anyone link me to some help, or can anyone suggest any ideas I could to tackle this issue
React has dangerouslySetInnerHTML for exactly this. If you're receiving HTML and you want it to be rendered as HTML (not as a string):
<div dangerouslySetInnerHTML={{ __html: post_text }} />
You should make sure your HTML is coming from a trusted source - in your case, a CMS should be fine.
I am not that familiar with the whole SGML family... I need to develop a small website which is part of an installation process of an application. The website shows permanently the features which were selected during the installation process. The website is fine - thanks to Bootstrap. But now I want to hide or show elements on this website according to the selection in the installation process.
During the installation I can modify an XML file. My idea is to bind the HTML attributes to the XML data.
Example XML I can modify during my installation process:
<features>
<feature>
<name>Feature 1</name>
<visible>hidden</visible>
<feature>
<features>
HTML idea:
<div class="feature1" VISIBLE_VALUE_FROM_XML>
<img src="./img/feature1"/>
</div>
Is it somehow possible to bind both? What are the relevant keywords here? What alternatives do I have? Do you have any good reading sources?
Thanks!
[EDIT]:
Perhaps the question was too trivial for you. I guess I was too limited in Data Binding thinking. So, the following steps do the trick:
leave your desk
grab a coffee
smoke a cigarette, if you like
use JS and traverse the XML tree
Here You GO!
With these steps you can do it.
Step 1 : Convert your XML to JSON using any one of the libraries (like jquery XML2JSON)
Step 2 : Select your "DIV" with id with jquery($("#yourid")) and modify the visibility according to the value of the visibility property in your json
(e.g)
if(json[feature].visibility=="hidden")
{
$("#yourid").hide();
}
Hello i am a web designer and i want to learn Ruby , i have a website running locally on my computer and i want to change a few things on the website i know how to deal with static pages not with pages based on Ruby.
i want to find the static pages in order to change the text or add a new code but i don't know where i can find it! i will copy and past part of piece of code for you to have a clear idea
This code for example what dose it mean where i can find the static page or the controls
ruby run to change the text
<%= t("pinplus.nav.label_legal") %>
start here:
https://www.youtube.com/results?search_query=how+to+install+ruby+on+rails
Then go here:
https://www.youtube.com/results?search_query=first+rails+app
finnaly here:
http://railscasts.com/
<%= t("pinplus.nav.label_legal") %> will output the corresponding text in the locale file labeled as pinplus.nav.label_legal. You will need to update the locale file for the language you want to change. For example to change the text for english open up config/locale/en.yml and look for the label_legal key. The structure of the file should be something like:
en:
pinplus:
nav:
label_legal: change me!
On my HTML index page, I am using a popup javascript code that has something like
<li> <font color ="#000"> » </font> <font color ="#ccc">
Some text</font><b>, XYX, Country</b></li>
<li><font color ="#000"> » </font><a href ="secondpage.php" alt="Blog" />
I used a free xml-sitemap generator and strangely, the second li which is a regular a href URL and shows up in the sitemap as a linked page. However, the first one which calls the page using a javascript function does not show up.
This got me thinking,
Would this impact SEO results, would search engines also skip JS code and hence not crawl the linked pages which open in a popup?
Or is this an issue with the sitemap generator that does not understand JS and I have to manually create it?
Totally new to this. Was hoping to get some advise .
thanks!
Ryan
answer will vary based of crawlers, but you should keep your markup readable and less dynamic in areas you want crawler to read or you can follow the guidelines provided. For specific answer to your question:
Since 2009 Google looks for and finds OnClick links in any and all HTML tags. When found they will add the URL to their crawl.
If there is sensible "anchor" text then the text of the element will be used as anchor text.
The OnClick link also passes PageRank.
For more info:
http://www.searchenginepeople.com/blog/onclick.html
http://seogadget.com/google-does-not-crawl-hidden-java-onclick/
I am attempting to create a simple iOS application, mostly for the learning process, but one which might also be useful to other botanists. The California Native Plant Society has a new Rare plant database online. At first I would like to just do simple querys for a plant by name. Later adding some type of location search, finding known occurrences of rare plants in your specific area.
So a search for `Layia' brings us to a page with a table. Looking at the source for the page I believe the table is generated by:
<div class="breadcrumb top20">
<div class="line1 center">
<!-- Modify Search Criteria -->
<span id=modifyCriteriaSlot></span>
<span id=exportPdfSlot></span>
<span id=exportExcelSlot></span>
<!-- END line1 -->
<span id=modifyColumnsSlot></span>
<span id=sortSlot></span>
<span id=displayPhotosSlot></span>
</div>
<!-- END line1 -->
</div>
I guess I am stuck. As far as the app goes I have been playing around with ASIHttpRequest and I see references to XMLKiss to parse web pages, but I just don't see any data on this page TO parse, it seems to be generated else ware and then just appears? I know I am a little out of my element here, but I want to put in the time and learn what I need to, so a little direction would be an awesome help! Thanks.
If it helps, they are showing the results table with this DIV
<div id=resultListSlot align=center style="max-width: 960px;"></div>
The DIV is being populated with javascript. The JS can be found here:
http://www.rareplants.cnps.org/org.cnps.Result/org.cnps.Result.nocache.js
Im not sure how you can get that to reply to your own request... let me look at it when I get back later today to see if I can help even more.
--------- Update -----------
If you wanted to skip learning JS you could just use firefox to view the DOM source which will include all the HTML generated by the JS. I just did a search for ALL of their plants, CTRL+A to select all of the page, right click on a highlighted area and "view selection source".
Then you could host your own page like I have done. Look at this page here http://luistovar.com/plants.html
Now you have all the plants, the HTML, the links and everything you need to create your own list. The only downfall is you would have to update every few weeks?? or so. It all depends on how often their data changes, or how much an updated list matters to you.
Might be better than learning JS though.