Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Please solve my problem, i am begging you.

Please see this picture.




<form name="form" method="post" action=""> 
<h4 align="center">Videos Upload Portal</h4>
<input type="hidden" name="new" value="1" />

<div class="form-group">
<label>Video ID:</label>
<input type="text" name="id" class="form-control" onchange="fillInTextArea(this);" required/>
</div>

<div class="form-group">
<label>Video Title:</label>
<input class="form-control" type="text" name="sname" required/>
</div>

<div class="form-group">
<label>Video Category:</label>
<select class="form-control" id="continent" name="category" onchange="countryChange(this);" required>
    <option value="empty">Select Video Category</option>
    <option value="WWE">WWE</option>
    <option value="Movies">Movies</option>
    <option value="Cartoons">Cartoons</option>
 </select>
 </div>
 
 <div class="form-group">
<label>Player Name:</label>
<select class="form-control" id="country" name="pname" onchange="fillInTextArea(this);" required>
<option value="0">Select a player name</option>
<option value="http://www.dailymotion.com/embed/video/">Dailymotion</option>
<option value="http://www.youtube.com/embed/">YouTube</option>
 </select>
 </div>
 
 <div class="form-group" style="display: none;">
<label>Publish Date:</label>
<input readonly value="<?php $dt = new DateTime("now", new DateTimeZone('GMT+0530')); echo $dt->format('Y/m/d, H:i:s');?>" class="form-control type="text" type="text" name="date"/>
</div>

<div class="form-group">
<label>Video Length:</label>
<select class="form-control" name="part" required>
    <option>Part-1</option>
    <option>Part-2</option>
    <option>Part-3</option>
    <option>Part-4</option>
	<option>Part-5</option>
	<option>Part-6</option>
	<option>Part-7</option>
	<option>Part-8</option>
	<option>Part-9</option>
	<option>Part-10</option>
	<option>Part-11</option>
	<option>Part-12</option>
	<option>Part-13</option>
	<option>Part-14</option>
	<option>Part-15</option>
	<option>Part-16</option>
	<option>Full Show</option>
	<option>Full Match</option>
	<option>Full Movie</option>
	<option>Full Video</option>
 </select>
 </div>
 
  <div class="form-group">
<label>Iframe Code:</label>
<textarea name="iframe" id="iframe" class="form-control" rows="2">

</textarea>
</div>
 
<button name="submit" type="submit" class="btn btn-primary">Publish Video</button> <br>

</form>


What I have tried:

I am trying below code but it shows errors, please give me a solution.

<script>
function fillInTextArea(formField)
{
	var	form = formField.form;	// Get the form that the changed field is in
	var	selectedIndex	= form.pname.selectedIndex;	// Item no in drop-down list. -1 = no selection, 0 = Select a country name, > 0 = country option
	form.iframe.value	= 
		"<iframe src='" + 
		(selectedIndex > 0 ? form.pname.options[selectedIndex].text : "not defined") + 	// Option text in cnasme or 'not selected' if no value selected
		"/" + 		
		(form.id.value.length ? form.id.value : "not specified") +	// Values in text field or 'not specified' if text field is empty
		"' style='border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;' allowfullscreen scrolling='no'></iframe>";
}
</script>


i am getting error on this line
style='border: 0; top: 0; left: 0; width: 100%; height: 100%;' at line 1


When i remove this code it shows another error like this
Dailymotion/jaffa'>','WWE','jaffa','2018/04/11, 10:53:17','Part-1','htt' at line 1
Posted
Updated 11-Apr-18 2:33am
v7
Comments
Patrice T 9-Apr-18 22:34pm    
And you plan to tell which errors and where ?
baddhidurgarao 11-Apr-18 1:23am    
i am getting error on this line
style='border: 0; top: 0; left: 0; width: 100%; height: 100%;' at line 1

When i remove this code it shows another error like this
Dailymotion/jaffa'>','WWE','jaffa','2018/04/11, 10:53:17','Part-1','htt' at line 1

Please see picture: https://image.ibb.co/imvjgc/Capture.jpg
Patrice T 11-Apr-18 1:29am    
Use Improve question to update your question.
So that everyone can pay attention to this information.
And give exact error message.
baddhidurgarao 11-Apr-18 1:34am    
i need another method, please help me.
Sunasara Imdadhusen 10-Apr-18 2:40am    
Need more clarification about the issue and how you retrived the value from iframe.

1 solution

Most of your previous posts to Q&A have a "I have no Idea" as the what you have tried.

I expect that it is quite true.

You should go about the effort of learning enough so you DO have an idea. We are here to help - but if you don't do your part, if it's not worth your time to do your part and "get an idea", then why should we?


 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900